mempool: fix memory loading error on 32-bit machines (#3969)

* Correct memory alignment for 32-bit machine. 

Switching the `txsBytes` and `rechecking` fields of `CListMempool` to ensure the correct memory alignment for `atomic.LoadInt64` on 32-bit machine.

* Update CHANGELOG_PENDING.md for #3968

Fixed #3968 `mempool` Memory Loading Error on 32-bit Ubuntu 16.04 Machine.

* Update CHANGELOG_PENDING.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
This commit is contained in:
Jon 2019-09-10 08:51:19 -04:00 committed by Anton Kaliaev
parent c4294bd4d7
commit 2edd89b450
2 changed files with 2 additions and 1 deletions

View File

@ -24,3 +24,4 @@ program](https://hackerone.com/tendermint).
### BUG FIXES:
- [consensus] \#3908 Wait `timeout_commit` to pass even if `create_empty_blocks` is `false`
- [mempool] \#3968 Fix memory loading error on 32-bit machines (@jon-certik)

View File

@ -53,8 +53,8 @@ type CListMempool struct {
// Atomic integers
height int64 // the last block Update()'d to
rechecking int32 // for re-checking filtered txs on Update()
txsBytes int64 // total size of mempool, in bytes
rechecking int32 // for re-checking filtered txs on Update()
// Keep a cache of already-seen txs.
// This reduces the pressure on the proxyApp.