goimports & golint

pull/1387/head
Eugene Kim 5 years ago
parent b02d1888bf
commit 5e44a2826a
  1. 4
      core/blockchain.go
  2. 4
      core/rawdb/accessors_chain.go
  3. 12
      core/types/block.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
}

@ -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.

@ -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,
})
}

Loading…
Cancel
Save