Skip to content

Commit 9db3e9b

Browse files
cygnet3setavenger
authored andcommitted
Fix byte order for block hash
1 parent c48c9a4 commit 9db3e9b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/spentutxos.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ func BuildSpentUTXOIndex(utxos []types.UTXO, block *types.Block) (types.SpentOut
1515
return types.SpentOutpointsIndex{}, err
1616
}
1717

18+
// reverse byte order to make little endian
19+
blockHashBytes = common.ReverseBytes(blockHashBytes)
20+
1821
spentOutpointsIndex := types.SpentOutpointsIndex{
1922
BlockHash: block.Hash,
2023
BlockHeight: block.Height,

0 commit comments

Comments
 (0)