Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Bugfix post v0.32 #155

Merged
merged 6 commits into from
Jan 11, 2021
Merged

Bugfix post v0.32 #155

merged 6 commits into from
Jan 11, 2021

Conversation

EnderCrypto
Copy link
Contributor

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

… (#3928)

* cs: check for SkipTimeoutCommit or wait timeout in handleTxsAvailable

Previously, if create_empty_blocks was set to false, TM sometimes could
create 2 consecutive blocks without actually waiting for timeoutCommit
(1 sec. by default).

```
I[2019-08-29|07:32:43.874] Executed block                               module=state height=47 validTxs=10 invalidTxs=0
I[2019-08-29|07:32:43.876] Committed state                              module=state height=47 txs=10 appHash=F88C010000000000
I[2019-08-29|07:32:44.885] Executed block                               module=state height=48 validTxs=2 invalidTxs=0
I[2019-08-29|07:32:44.887] Committed state                              module=state height=48 txs=2 appHash=FC8C010000000000
I[2019-08-29|07:32:44.908] Executed block                               module=state height=49 validTxs=8 invalidTxs=0
I[2019-08-29|07:32:44.909] Committed state                              module=state height=49 txs=8 appHash=8C8D010000000000
I[2019-08-29|07:32:45.886] Executed block                               module=state height=50 validTxs=2 invalidTxs=0
I[2019-08-29|07:32:45.895] Committed state                              module=state height=50 txs=2 appHash=908D010000000000
I[2019-08-29|07:32:45.908] Executed block                               module=state height=51 validTxs=8 invalidTxs=0
I[2019-08-29|07:32:45.909] Committed state                              module=state height=51 txs=8 appHash=A08D010000000000
```

This commit fixes that by adding a check to handleTxsAvailable.

Fixes #3908

* update changelog

* schedule timeoutCommit if StartTime is in the future

or SkipTimeoutCommit=true && we DON'T have all the votes

* fix TestReactorCreatesBlockWhenEmptyBlocksFalse

by checking if we have LastCommit or not

* address Ethan's comments
@EnderCrypto EnderCrypto changed the base branch from master to develop December 25, 2020 09:14
@EnderCrypto EnderCrypto mentioned this pull request Dec 26, 2020
5 tasks
@unclezoro
Copy link
Collaborator

There is a comment of a commit is cherry-pick commit 274447e2b, please use the origin info.

@EnderCrypto EnderCrypto merged commit 5a811c3 into develop Jan 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants