aboutsummaryrefslogtreecommitdiff
path: root/src/torcontrol.cpp
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2024-01-10 16:50:34 +0000
committerglozow <gloriajzhao@gmail.com>2024-01-10 16:55:46 +0000
commit632a2bb731804dffe52bd4cbd90bfee352d25ede (patch)
tree2c29f1958ee7eb9387d40c9ecbb669853029dcd5 /src/torcontrol.cpp
parent063a8b83875997068b3eb506b5f30f2691d18052 (diff)
parent931575418e082af37b88b1819125b0d0f0fabbd5 (diff)
Merge bitcoin/bitcoin#29215: test: assumeutxo: spend coin from snapshot chainstate after loading
931575418e082af37b88b1819125b0d0f0fabbd5 test: assumeutxo: spend coin from snapshot chainstate after loading (Sebastian Falbesoner) Pull request description: This PR extends the AssumeUTXO functional test by submitting a spending transaction for an UTXO that is only available in a the snapshot chainstate (after loading via `loadtxoutset`), i.e. it hasn't been seen in a block before. With that we can verify that snapshot coins are visible to the mempool. Note that we unfortunately can't use MiniWallet here, as the only available UTXO to spend from the snapshot chainstate is at height 200, where a P2PKH created from the test framework's deterministic private key is used (see `TestNode.generate(...)` and the `PRIV_KEYS` array). Coinbase outputs with smaller heights (<= 199) would be part of the pre-generated chain and hence not qualify for the "UTXO is only in snapshot chainstate and has never been seen in a block" scenario, coinbase outputs with larger heights (>= 201) can't be spent due to immaturity, as the snapshot chainstate block height is 299. One could of course mine a different chain with outputs that MiniWallet supports (e.g. taproot anyone-can-spend), but this would change the hardcoded AssumeUTXO hash, colliding with other PRs like #28838, so I wanted to avoid that. ACKs for top commit: maflcko: lgtm ACK 931575418e082af37b88b1819125b0d0f0fabbd5 jamesob: ACK https://github.com/bitcoin/bitcoin/pull/29215/commits/931575418e082af37b88b1819125b0d0f0fabbd5 Tree-SHA512: 0665868e1e91fe74f408d0a239cc264bbbc11a6b55bcc0e86cc8b4b2ec1f44977884b817dbe9065a7c768332cab464636656858bc8b9c8e7d7810498e0a17d78
Diffstat (limited to 'src/torcontrol.cpp')
0 files changed, 0 insertions, 0 deletions