Commit da204d3 1 parent 9d01a68 commit da204d3 Copy full SHA for da204d3
File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 34
34
- [ p2p/pex] \# 6509 Improve addrBook.hash performance (@cuonglm )
35
35
- [ crypto/merkle] \# 6443 & \# 6513 Improve HashAlternatives performance (@cuonglm , @marbar3778 )
36
36
- [ rpc] \# 9650 Enable caching of RPC responses (@JayT106 )
37
+ - [ consensus] \# 9760 Save peer LastCommit correctly to achieve 50% reduction in gossiped precommits. (@williambanfield )
37
38
38
39
### BUG FIXES
39
40
Original file line number Diff line number Diff line change @@ -1351,6 +1351,7 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) {
1351
1351
psRound := ps .PRS .Round
1352
1352
psCatchupCommitRound := ps .PRS .CatchupCommitRound
1353
1353
psCatchupCommit := ps .PRS .CatchupCommit
1354
+ lastPrecommits := ps .PRS .Precommits
1354
1355
1355
1356
startTime := tmtime .Now ().Add (- 1 * time .Duration (msg .SecondsSinceStartTime ) * time .Second )
1356
1357
ps .PRS .Height = msg .Height
@@ -1378,7 +1379,7 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) {
1378
1379
// Shift Precommits to LastCommit.
1379
1380
if psHeight + 1 == msg .Height && psRound == msg .LastCommitRound {
1380
1381
ps .PRS .LastCommitRound = msg .LastCommitRound
1381
- ps .PRS .LastCommit = ps . PRS . Precommits
1382
+ ps .PRS .LastCommit = lastPrecommits
1382
1383
} else {
1383
1384
ps .PRS .LastCommitRound = msg .LastCommitRound
1384
1385
ps .PRS .LastCommit = nil
You can’t perform that action at this time.
0 commit comments