@@ -24,12 +24,12 @@ const (
2424
2525// ProposeBlock is called when the consensus routine has created a new proposal,
2626// and it needs to be gossiped to the rest of the network.
27- func (blockProp * Reactor ) ProposeBlock (proposal * types.Proposal , block * types.PartSet , txs []proptypes.TxMetaData ) {
27+ func (blockProp * Reactor ) ProposeBlock (proposal * types.Proposal , block * types.PartSet , txs []proptypes.TxMetaData ) error {
2828 // create the parity data and the compact block
2929 parityBlock , lastLen , err := types .Encode (block , types .BlockPartSizeBytes )
3030 if err != nil {
3131 blockProp .Logger .Error ("failed to encode block" , "err" , err )
32- return
32+ return err
3333 }
3434
3535 partHashes := extractHashes (block , parityBlock )
@@ -48,7 +48,7 @@ func (blockProp *Reactor) ProposeBlock(proposal *types.Proposal, block *types.Pa
4848 sbz , err := cb .SignBytes ()
4949 if err != nil {
5050 blockProp .Logger .Error ("failed to create signature for compact block" , "err" , err )
51- return
51+ return err
5252 }
5353
5454 // sign the hash of the compact block NOTE: p2p message sign bytes are
@@ -62,7 +62,7 @@ func (blockProp *Reactor) ProposeBlock(proposal *types.Proposal, block *types.Pa
6262 "chain_id" , blockProp .chainID ,
6363 "unique_id" , CompactBlockUID ,
6464 )
65- return
65+ return err
6666 }
6767
6868 cb .Signature = sig
@@ -128,6 +128,7 @@ func (blockProp *Reactor) ProposeBlock(proposal *types.Proposal, block *types.Pa
128128
129129 schema .WriteBlockPartState (blockProp .traceClient , proposal .Height , proposal .Round , chunks [index ].GetTrueIndices (), true , string (peer .peer .ID ()), schema .Upload )
130130 }
131+ return nil
131132}
132133
133134func extractHashes (blocks ... * types.PartSet ) [][]byte {
0 commit comments