dao: store blocks/txransactions by big-endian hash

There is no need for additional allocations.
This commit is contained in:
Evgenii Stratonikov 2020-11-25 13:59:30 +03:00
parent 619b6d4132
commit 54b177cf40
3 changed files with 7 additions and 7 deletions

View file

@ -114,7 +114,7 @@ func TestAddBlock(t *testing.T) {
require.NoError(t, bc.persist())
for _, block := range blocks {
key := storage.AppendPrefix(storage.DataBlock, block.Hash().BytesLE())
key := storage.AppendPrefix(storage.DataBlock, block.Hash().BytesBE())
_, err := bc.dao.Store.Get(key)
require.NoErrorf(t, err, "block %s not persisted", block.Hash())
}