diff --git a/core/blockchain.go b/core/blockchain.go index 589f29eb6..871ac67dc 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2107,7 +2107,7 @@ func (bc *BlockChain) CXMerkleProof(shardID uint32, block *types.Block) (*types. } // NextCXReceiptsProofUnspentCheckpoint returns the next checkpoint blockNum -func (bc *BlockChain) NextCXReceiptsProofUnpentCheckpoint(currentNum uint64, shardID uint32) uint64 { +func (bc *BlockChain) NextCXReceiptsProofUnspentCheckpoint(currentNum uint64, shardID uint32) uint64 { lastCheckpoint, _ := rawdb.ReadCXReceiptsProofUnspentCheckpoint(bc.db, shardID) newCheckpoint := lastCheckpoint @@ -2138,7 +2138,7 @@ func (bc *BlockChain) UpdateCXReceiptsProofUnspentAndCheckpoint(currentNum uint6 if err != nil { utils.Logger().Warn().Msg("[UpdateCXReceiptsProofUnspentAndCheckpoint] Canot get lastCheckpoint") } - newCheckpoint := bc.NextCXReceiptsProofUnpentCheckpoint(currentNum, shardID) + newCheckpoint := bc.NextCXReceiptsProofUnspentCheckpoint(currentNum, shardID) if lastCheckpoint == newCheckpoint { return } diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index 3a66fcc41..e58b32369 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -32,8 +32,8 @@ import ( // Indicate whether the receipts corresponding to a blockHash is unspent or not // use a default blockHash as indicator which should be collision resistent var ( - SpentHash common.Hash = common.Hash{0x01} - EmptyHash common.Hash = common.Hash{} + SpentHash = common.Hash{0x01} + EmptyHash = common.Hash{} ) // ReadCanonicalHash retrieves the hash assigned to a canonical block number. diff --git a/core/types/block.go b/core/types/block.go index 150dc8672..633d09ebb 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -207,9 +207,9 @@ type StorageBlock Block // "external" block encoding. used for eth protocol, etc. type extblock struct { - Header *Header - Txs []*Transaction - Uncles []*Header + Header *Header + Txs []*Transaction + Uncles []*Header IncomingReceipts CXReceiptsProofs } @@ -323,9 +323,9 @@ func (b *Block) DecodeRLP(s *rlp.Stream) error { // EncodeRLP serializes b into the Ethereum RLP block format. func (b *Block) EncodeRLP(w io.Writer) error { return rlp.Encode(w, extblock{ - Header: b.header, - Txs: b.transactions, - Uncles: b.uncles, + Header: b.header, + Txs: b.transactions, + Uncles: b.uncles, IncomingReceipts: b.incomingReceipts, }) }