rpc: update test chain

Also provide info for getblockheader RPC while
generating test chain.
This commit is contained in:
Evgenii Stratonikov 2020-04-06 09:27:15 +03:00
parent 004023920e
commit 1fcc019bf3
3 changed files with 18 additions and 12 deletions

View file

@ -229,6 +229,12 @@ func TestCreateBasicChain(t *testing.T) {
require.NoError(t, bc.AddBlock(b))
t.Logf("txMoveNeo: %s", txMoveNeo.Hash().StringLE())
// info for getblockheader rpc tests
t.Logf("header hash: %s", b.Hash().StringLE())
buf := io.NewBufBinWriter()
b.Header().EncodeBinary(buf.BinWriter)
t.Logf("header: %s", hex.EncodeToString(buf.Bytes()))
// Generate some blocks to be able to claim GAS for them.
_, err = bc.genBlocks(numOfEmptyBlocks)
require.NoError(t, err)