Page MenuHomePhabricator

wallet: Avoid use of Chain::Lock in listsinceblock
ClosedPublic

Authored by deadalnix on Oct 10 2020, 23:42.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC85c542618a11: wallet: Avoid use of Chain::Lock in listsinceblock
Summary

This is a step toward removing the Chain::Lock class and reducing cs_main
locking.

This change only affects behavior in the case where wallet last block processed
falls behind the chain tip. Previously listsinceblock might not have returned
all transactions up to the claimed "lastblock" value in this case, resulting in
race conditions and potentially missing transactions in cases where
listsinceblock was called in a loop like
https://github.com/bitcoin/bitcoin/issues/14338#issuecomment-426706574

This is part [7/12] of Core PR17954 : https://github.com/bitcoin/bitcoin/pull/17954/commits/f7ba881bc669451a60fedac58a449794702a3e23

Depends on D7869

Test Plan
ninja all check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable