Simplify return values of GetCoin/HaveCoin(InCache)
commit21180ff73436e198b6828c312ddfd0a1195447b2
authorPieter Wuille <pieter.wuille@gmail.com>
Tue, 13 Jun 2017 19:17:30 +0000 (13 12:17 -0700)
committerPieter Wuille <pieter.wuille@gmail.com>
Mon, 26 Jun 2017 23:16:26 +0000 (26 16:16 -0700)
tree32541dfda7113742cc54340eda7e859ab62869ce
parent234ffc677ee58591b139695bf92bbd6f504ee91a
Simplify return values of GetCoin/HaveCoin(InCache)

This removes the possibility for GetCoin/HaveCoin/HaveCoinInCache to return
true while the respective coin is spent. By doing it across all calls, some
extra checks can be eliminated.

coins_tests is modified to call HaveCoin sometimes before and sometimes
after AccessCoin. A further change is needed because the semantics for
GetCoin slightly changed, causing a pruned entry in the parent cache to not
be pulled into the child in FetchCoin.
src/coins.cpp
src/coins.h
src/test/coins_tests.cpp
src/txmempool.cpp
src/txmempool.h