mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-07-03 03:12:30 +00:00
Add basic test for getbestblockhash.
And move the getblock/getblockcount so they are in order.
This commit is contained in:
parent
d1ac7b9384
commit
ebc4c17162
@ -276,20 +276,11 @@ var jsoncmdtests = []struct {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "basic ping",
|
||||
name: "basic getbestblockhash",
|
||||
f: func() (Cmd, error) {
|
||||
return NewPingCmd(float64(1))
|
||||
return NewGetBestBlockHashCmd(float64(1))
|
||||
},
|
||||
result: &PingCmd{
|
||||
id: float64(1),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "basic getblockcount",
|
||||
f: func() (Cmd, error) {
|
||||
return NewGetBlockCountCmd(float64(1))
|
||||
},
|
||||
result: &GetBlockCountCmd{
|
||||
result: &GetBestBlockHashCmd{
|
||||
id: float64(1),
|
||||
},
|
||||
},
|
||||
@ -304,6 +295,24 @@ var jsoncmdtests = []struct {
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user