Skip to content

Commit

Permalink
btcjson: add test for null params in searchrawtransactions
Browse files Browse the repository at this point in the history
Closes PR #1476.
  • Loading branch information
onyb authored and jcvernaleo committed Sep 21, 2020
1 parent e5521de commit f402416
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions btcjson/chainsvrcmds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,26 @@ func TestChainSvrCmds(t *testing.T) {
FilterAddrs: &[]string{"1Address"},
},
},
{
name: "searchrawtransactions",
newCmd: func() (interface{}, error) {
return btcjson.NewCmd("searchrawtransactions", "1Address", 0, 5, 10, "null", true, []string{"1Address"})
},
staticCmd: func() interface{} {
return btcjson.NewSearchRawTransactionsCmd("1Address",
btcjson.Int(0), btcjson.Int(5), btcjson.Int(10), nil, btcjson.Bool(true), &[]string{"1Address"})
},
marshalled: `{"jsonrpc":"1.0","method":"searchrawtransactions","params":["1Address",0,5,10,null,true,["1Address"]],"id":1}`,
unmarshalled: &btcjson.SearchRawTransactionsCmd{
Address: "1Address",
Verbose: btcjson.Int(0),
Skip: btcjson.Int(5),
Count: btcjson.Int(10),
VinExtra: nil,
Reverse: btcjson.Bool(true),
FilterAddrs: &[]string{"1Address"},
},
},
{
name: "sendrawtransaction",
newCmd: func() (interface{}, error) {
Expand Down

0 comments on commit f402416

Please sign in to comment.