Page MenuHomePhabricator

rpc: Relock wallet only if most recent callback
ClosedPublic

Authored by Fabien on Jan 6 2021, 10:18.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCafc426328870: rpc: Relock wallet only if most recent callback
Summary
This PR fixes an early relocking race condition from #18811 where old
relock callback runs after new wallet unlock code and nRelockTime update
but before rpcRunLater call, causing early relock and incorrect
nRelockTime time

Backport of core PR18814.

Fix spurious wallet_descriptor.py failure like
https://build.bitcoinabc.org/viewLog.html?tab=buildLog&logTab=tree&filter=debug&expand=all&buildId=167449&_focus=3291&guest=1.

Test Plan

With Clang:

ninja all check-all