diff --git a/chain/block.go b/chain/block.go index 76261e8ab5..74bc0d83b0 100644 --- a/chain/block.go +++ b/chain/block.go @@ -300,6 +300,9 @@ func (b *StatelessBlock) initializeBuilt( txID := b.Txs[i].ID() resultOutput := b.results[i].Output // [txID + resultOutput] + // txID is a fixed length array, hence [append] will always allocate new memory and copy + // so slice with new address will be returned and no reflect on txID, then later + // we consume those bytes merkleItems = append(merkleItems, append(txID[:], resultOutput...)) }