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
Branch
callblockuntil
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4443
Build 6950: Bitcoin ABC Buildbot (legacy)
Build 6949: arc lint + arc unit

Event Timeline

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

Remove this line break

3594

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

Remove eroneous call to BlockUntilSyncedToCurrentChain

src/wallet/rpcwallet.cpp
922

clang-format insist on doing otherwise.

This revision is now accepted and ready to land.Jan 14 2019, 13:57
This revision was automatically updated to reflect the committed changes.
markblundeberg added inline comments.
src/wallet/rpcwallet.cpp
925 ↗(On Diff #6645)

Note this actually came from #10807. https://github.com/bitcoin/bitcoin/pull/10807/files