core: make test chain format compatible with mainnet
Write uint32 length before every block.
This commit is contained in:
parent
51c4868641
commit
44792ed5f7
3 changed files with 2 additions and 0 deletions
|
@ -52,6 +52,7 @@ func initServerWithInMemoryChain(t *testing.T) (*core.Blockchain, http.HandlerFu
|
|||
nBlocks = br.ReadU32LE()
|
||||
require.Nil(t, br.Err)
|
||||
for i := 0; i < int(nBlocks); i++ {
|
||||
_ = br.ReadU32LE()
|
||||
b := &block.Block{}
|
||||
b.DecodeBinary(br)
|
||||
require.Nil(t, br.Err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue