btcjson: add test for null params in searchrawtransactions
Closes PR #1476.
This commit is contained in:
parent
e5521de652
commit
f4024160f3
1 changed files with 20 additions and 0 deletions
|
@ -1201,6 +1201,26 @@ func TestChainSvrCmds(t *testing.T) {
|
||||||
FilterAddrs: &[]string{"1Address"},
|
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",
|
name: "sendrawtransaction",
|
||||||
newCmd: func() (interface{}, error) {
|
newCmd: func() (interface{}, error) {
|
||||||
|
|
Loading…
Reference in a new issue