File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
crates/ethcore/src/engines/hbbft Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,18 @@ impl KeygenTransactionSender {
130130
131131 let current_block = client. block_number ( BlockId :: Latest ) . unwrap_or ( 0 ) ;
132132
133- // this check also prevents the resending of Transaction in a manner.
133+ // this check also prevents the resending of Transactions if no block got mined. (e.g. because of stalled network)
134134 if last_sent. block_sent + KEYGEN_TRANSACTION_RESEND_DELAY_BLOCKS
135- < current_block
135+ > current_block
136136 {
137+ // example:
138+ // send on block 10 (last_sent.block_sent = 10)
139+ // KEYGEN_TRANSACTION_RESEND_DELAY_BLOCKS = 2
140+ // resent after Block 12.
141+ // current block is 11: waiting
142+ // current block is 12: waiting
143+ // current block is 13: not entering => YES
144+
137145 // we sent a transaction recently, so we should wait a bit.
138146 return Ok ( ShouldSendKeyAnswer :: NoWaiting ) ;
139147 }
You can’t perform that action at this time.
0 commit comments