Page MenuHomePhabricator

Add calls to CWallet::BlockUntilSyncedToCurrentChain() in RPCs
ClosedPublic

Authored by deadalnix on Jan 8 2019, 01:38.

Details

Summary

This prevents the wallet-RPCs-return-stale-info issue from being
re-introduced when new-block callbacks no longer happen in the
block-connection cs_main lock

This is extracted from Core's PR10286 commit 5d67a7868db188f7e43ce9028f215034d057790d

Depends on D2267

Test Plan
make check
./test/functional/test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Jan 8 2019, 01:38
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 8 2019, 01:38
Herald added a subscriber: schancel. · View Herald Transcript
Fabien requested changes to this revision.Jan 8 2019, 12:44
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/wallet/rpcwallet.cpp
922 ↗(On Diff #6548)

Remove this line break

3594 ↗(On Diff #6548)

I think you wanted to move it down instead of calling it twice ?

This revision now requires changes to proceed.Jan 8 2019, 12:44
deadalnix updated this revision to Diff 6555.Jan 8 2019, 15:28

Remove eroneous call to BlockUntilSyncedToCurrentChain

src/wallet/rpcwallet.cpp
922 ↗(On Diff #6548)

clang-format insist on doing otherwise.

Fabien accepted this revision.Jan 14 2019, 13:57
This revision is now accepted and ready to land.Jan 14 2019, 13:57
Closed by commit rABCef7ab2674294: Add calls to CWallet::BlockUntilSyncedToCurrentChain() in RPCs (authored by Matt Corallo <git@bluematt.me>, committed by deadalnix). · Explain WhyJan 14 2019, 14:51
This revision was automatically updated to reflect the committed changes.