Page MenuHomePhabricator

rpc: Expose g_is_mempool_loaded via getmempoolinfo
ClosedPublic

Authored by fpelliccioni on Oct 11 2019, 21:08.

Details

Summary

And use it to fix a race condition in mempool_persist.py:
https://travis-ci.org/Empact/bitcoin/jobs/487577243

Backport of Bitcoin Core PR15323
https://github.com/bitcoin/bitcoin/pull/15323

Depends on D4234 and D4266.

Test Plan
ninja check-all
  • Read the docs.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
feature-backport-12aa2ac98
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7747
Build 13533: Bitcoin ABC Buildbot (legacy)
Build 13532: arc lint + arc unit

Event Timeline

fpelliccioni created this revision.Oct 11 2019, 21:08
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 11 2019, 21:08
fpelliccioni planned changes to this revision.Oct 11 2019, 21:09
fpelliccioni edited the test plan for this revision. (Show Details)

I have to fix the squash

fpelliccioni edited the summary of this revision. (Show Details)Oct 15 2019, 13:46
fpelliccioni edited the test plan for this revision. (Show Details)
fpelliccioni updated this revision to Diff 13562.Oct 15 2019, 14:05
fpelliccioni edited the test plan for this revision. (Show Details)

fix the rebase

Fabien requested changes to this revision.Oct 16 2019, 15:20
Fabien added inline comments.
src/validation.cpp
5641 ↗(On Diff #13562)

Part of the PR is missing here.

This revision now requires changes to proceed.Oct 16 2019, 15:20
fpelliccioni added inline comments.Oct 16 2019, 15:47
src/validation.cpp
5641 ↗(On Diff #13562)

I tracked these changes to this commit:
https://github.com/jasonbcox/bitcoin/commit/26fee4f6b

It's very old, I guess it hasn't been backported on purpose.

I think you got the dependency reversed.

I think you got the dependency reversed.

I ordered the dependencies based on the date of the log:

12aa2ac98 - Merge #15323: rpc: Expose g_is_mempool_loaded via getmempoolinfo (2019-05-01 ~ 5 months ago) <MarcoFalke>
3515612e0 - Merge #15473: bench: Benchmark MempoolToJSON (2019-03-06 ~ 7 months ago) <MarcoFalke>
fpelliccioni requested review of this revision.Oct 18 2019, 14:26
deadalnix requested changes to this revision.Oct 23 2019, 01:45

Please rebase, otherwise LGTM.

src/validation.cpp
5641 ↗(On Diff #13562)

You need to rebase on top of that patch.

This revision now requires changes to proceed.Oct 23 2019, 01:45
deadalnix requested changes to this revision.Oct 24 2019, 01:07

Actually do the rebase an the backport, not just run the git rebase command.

This revision now requires changes to proceed.Oct 24 2019, 01:07

Actually do the rebase an the backport, not just run the git rebase command.

Sorry for not clarifying what I did:
D4266 was landed...
Then I rebased from master: git rebase -i master
... and then from the D4234 branch: git rebase -i arcpatch-D4234

fpelliccioni requested review of this revision.Oct 24 2019, 19:12

Please see my previous comment clarifying how I made the rebase.

deadalnix requested changes to this revision.Oct 25 2019, 01:05
deadalnix added inline comments.
src/validation.cpp
5647 ↗(On Diff #13673)

here

This revision now requires changes to proceed.Oct 25 2019, 01:05
fpelliccioni updated this revision to Diff 13701.Oct 25 2019, 14:58

Applies backport changes.

Fabien accepted this revision.Oct 26 2019, 06:53
deadalnix accepted this revision.Oct 28 2019, 00:02
This revision is now accepted and ready to land.Oct 28 2019, 00:02
fpelliccioni updated this revision to Diff 13740.Oct 29 2019, 14:28

rebase from master