Skip to content

Commit

Permalink
btcjson: add test for null params in searchrawtransactions
Browse files Browse the repository at this point in the history
  • Loading branch information
onyb committed Sep 17, 2020
1 parent c693bd8 commit 49f4cf2
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 49f4cf2

Please sign in to comment.