Closed piersy closed 7 months ago
Coverage from tests in ./e2e_test/...
for ./consensus/istanbul/...
at commit 2aa6d4603436a95ab6ac9631d35c822cfcde426a
coverage: 57.2% of statements in consensus/istanbul coverage: 23.7% of statements in consensus/istanbul/announce coverage: 54.4% of statements in consensus/istanbul/backend coverage: 0.0% of statements in consensus/istanbul/backend/backendtest coverage: 24.3% of statements in consensus/istanbul/backend/internal/replica coverage: 64.9% of statements in consensus/istanbul/core coverage: 45.0% of statements in consensus/istanbul/db coverage: 0.0% of statements in consensus/istanbul/proxy coverage: 64.2% of statements in consensus/istanbul/uptime coverage: 51.8% of statements in consensus/istanbul/validator coverage: 79.2% of statements in consensus/istanbul/validator/random
This sounds reasonable for at least some of the cases. I'm not sure we need the sync everywhere but I also don't see any harm in it (it can only slow things down, but not to a degree that matters, AFAICS).
As so often, upstream already solved the issue in at least some cases, see ethereum/go-ethereum@c866dfd#diff-6083272455b210c86aaa70e7a348d038d2867870cedb4d402b4909abef8fa23b .
Yep, I did check upstream but it seems unlikely we will do any more upstream merges, so this shouldn't cause us any trouble.
Without the use of sync calls there is no guarantee that txpoool reorg will run between adding txs and chekcking some condition, this causes tests to fail randomly.
This PR ensures the use of sync calls.
Tested
To verify my suspicion that the lack of reorg running was the cause of the error I was seeing in
TestTransactionPoolUnderpricing
i used the following patch to reliably recreate the error.Related issues