diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 58ac79bfd..e33081dd4 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -30,3 +30,4 @@ program](https://hackerone.com/tendermint). ### BUG FIXES: - [tools] [\#4023](https://github.com/tendermint/tendermint/issues/4023) Refresh `tm-monitor` health when validator count is updated (@erikgrinaker) +- [state] [\#4104](https://github.com/tendermint/tendermint/pull/4104) txindex/kv: Fsync data to disk immediately after receiving it (@guagualvcha) diff --git a/state/txindex/kv/kv.go b/state/txindex/kv/kv.go index 8fcce4862..dd9c5f300 100644 --- a/state/txindex/kv/kv.go +++ b/state/txindex/kv/kv.go @@ -103,7 +103,7 @@ func (txi *TxIndex) AddBatch(b *txindex.Batch) error { storeBatch.Set(hash, rawBytes) } - storeBatch.Write() + storeBatch.WriteSync() return nil } @@ -132,7 +132,7 @@ func (txi *TxIndex) Index(result *types.TxResult) error { } b.Set(hash, rawBytes) - b.Write() + b.WriteSync() return nil }