Add basic test for getbestblockhash.
And move the getblock/getblockcount so they are in order.
This commit is contained in:
parent
d1ac7b9384
commit
ebc4c17162
1 changed files with 21 additions and 12 deletions
|
@ -276,20 +276,11 @@ var jsoncmdtests = []struct {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "basic ping",
|
name: "basic getbestblockhash",
|
||||||
f: func() (Cmd, error) {
|
f: func() (Cmd, error) {
|
||||||
return NewPingCmd(float64(1))
|
return NewGetBestBlockHashCmd(float64(1))
|
||||||
},
|
},
|
||||||
result: &PingCmd{
|
result: &GetBestBlockHashCmd{
|
||||||
id: float64(1),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "basic getblockcount",
|
|
||||||
f: func() (Cmd, error) {
|
|
||||||
return NewGetBlockCountCmd(float64(1))
|
|
||||||
},
|
|
||||||
result: &GetBlockCountCmd{
|
|
||||||
id: float64(1),
|
id: float64(1),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -304,6 +295,24 @@ var jsoncmdtests = []struct {
|
||||||
Hash: "somehash",
|
Hash: "somehash",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "basic getblockcount",
|
||||||
|
f: func() (Cmd, error) {
|
||||||
|
return NewGetBlockCountCmd(float64(1))
|
||||||
|
},
|
||||||
|
result: &GetBlockCountCmd{
|
||||||
|
id: float64(1),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "basic ping",
|
||||||
|
f: func() (Cmd, error) {
|
||||||
|
return NewPingCmd(float64(1))
|
||||||
|
},
|
||||||
|
result: &PingCmd{
|
||||||
|
id: float64(1),
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCmds(t *testing.T) {
|
func TestCmds(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue