rpc/server: allow specifying number for getblockheader

As it should be allowed.
This commit is contained in:
Roman Khimov 2020-06-05 16:02:55 +03:00
parent dfb26f9ab2
commit 2ef9ec0756
2 changed files with 25 additions and 12 deletions

View file

@ -910,6 +910,10 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) []
t.Run("verbose=0", func(t *testing.T) {
runCase(t, fmt.Sprintf(rpc, `["`+testHeaderHash+`", 0]`), &encoded, new(string))
})
t.Run("by number", func(t *testing.T) {
runCase(t, fmt.Sprintf(rpc, `[1]`), &encoded, new(string))
})
})
t.Run("verbose != 0", func(t *testing.T) {