// BlockSignatureMsg block signature message transferred between nodes.
type BlockSignatureMsg struct {
BlockHash [32]byte
- Height uint64
Signature []byte
PubKey []byte
}
//NewBlockSignatureMsg create new block signature msg.
-func NewBlockSignatureMsg(blockHash bc.Hash, height uint64, signature, pubKey []byte) ConsensusMessage {
+func NewBlockSignatureMsg(blockHash bc.Hash, signature, pubKey []byte) ConsensusMessage {
hash := blockHash.Byte32()
- return &BlockSignatureMsg{BlockHash: hash, Height: height, Signature: signature, PubKey: pubKey}
+ return &BlockSignatureMsg{BlockHash: hash, Signature: signature, PubKey: pubKey}
}
func (bs *BlockSignatureMsg) String() string {
- return fmt.Sprintf("{block_hash: %s,block_height:%d,signature:%s,pubkey:%s}", hex.EncodeToString(bs.BlockHash[:]), bs.Height, hex.EncodeToString(bs.Signature), hex.EncodeToString(bs.PubKey[:]))
+ return fmt.Sprintf("{block_hash: %s,signature:%s,pubkey:%s}", hex.EncodeToString(bs.BlockHash[:]), hex.EncodeToString(bs.Signature), hex.EncodeToString(bs.PubKey[:]))
}
// BroadcastMarkSendRecord mark send message record to prevent messages from being sent repeatedly.