|
|
@ -2,6 +2,7 @@ package consensus |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"math/big" |
|
|
|
"math/big" |
|
|
|
|
|
|
|
"sync/atomic" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
protobuf "github.com/golang/protobuf/proto" |
|
|
|
protobuf "github.com/golang/protobuf/proto" |
|
|
@ -275,9 +276,7 @@ func (consensus *Consensus) checkViewID(msg *FBFTMessage) error { |
|
|
|
|
|
|
|
|
|
|
|
// SetBlockNum sets the blockNum in consensus object, called at node bootstrap
|
|
|
|
// SetBlockNum sets the blockNum in consensus object, called at node bootstrap
|
|
|
|
func (consensus *Consensus) SetBlockNum(blockNum uint64) { |
|
|
|
func (consensus *Consensus) SetBlockNum(blockNum uint64) { |
|
|
|
consensus.infoMutex.Lock() |
|
|
|
atomic.StoreUint64(&consensus.blockNum, blockNum) |
|
|
|
defer consensus.infoMutex.Unlock() |
|
|
|
|
|
|
|
consensus.blockNum = blockNum |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ReadSignatureBitmapPayload read the payload for signature and bitmap; offset is the beginning position of reading
|
|
|
|
// ReadSignatureBitmapPayload read the payload for signature and bitmap; offset is the beginning position of reading
|
|
|
|