fix block proposal

pull/3405/head
Rongjian Lan 4 years ago
parent 41c5b42516
commit 628174b379
  1. 2
      consensus/consensus.go
  2. 2
      crypto/bls/bls.go
  3. 1
      node/node_newblock.go

@ -25,7 +25,7 @@ const (
vdfAndSeedSize = 548 // size of VDF/Proof and Seed
)
var errLeaderPriKeyNotFound = errors.New("getting leader private key from consensus public keys failed")
var errLeaderPriKeyNotFound = errors.New("leader private key not found locally")
// ProposalType is to indicate the type of signal for new block proposal
type ProposalType byte

@ -99,7 +99,7 @@ func (pk *SerializedPublicKey) FromLibBLSPublicKey(key *bls.PublicKey) error {
// SeparateSigAndMask parse the commig signature data into signature and bitmap.
func SeparateSigAndMask(commitSigs []byte) ([]byte, []byte, error) {
if len(commitSigs) < BLSSignatureSizeInBytes {
return nil, nil, errors.New("no mask data found in commit sigs")
return nil, nil, errors.Errorf("no mask data found in commit sigs: %x", commitSigs)
}
//#### Read payload data from committed msg
aggSig := make([]byte, BLSSignatureSizeInBytes)

@ -95,6 +95,7 @@ func (node *Node) WaitForConsensusReadyV2(readySignal chan consensus.ProposalTyp
// Send the new block to Consensus so it can be confirmed.
node.BlockChannel <- newBlock
break
} else {
utils.Logger().Err(err).Msg("!!!!!!!!!Failed Proposing New Block!!!!!!!!!")
retryCount--

Loading…
Cancel
Save