HomePhabricator

[avalanche] improve stake generation in functional test

Description

[avalanche] improve stake generation in functional test

Summary:
This adds a function to generate 10 stakes per block, by splitting each coinbase transaction into 10 UTXOs, instead of using a whole coinbase UTXO for each stake.

It makes it possible to generate more stakes that are above the dust threshold limit. Coinbase UTXOs are only valid up to block 900 on regtest, due to halvings every 150 blocks.

This fixes the test failure in D9345, when testing a proof with 1000 stakes.

Test Plan:
ninja check-functional

Verify that renaming the get_stakes function did not affect any other test.
grep -r get_stakes test/functional

Run the tests with the wallet disabled:

cmake .. -DBUILD_BITCOIN_WALLET=OFF -GNinja
ninja check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9441

Details

Provenance
PiRKAuthored on Apr 27 2021, 06:53
PiRKPushed on Apr 27 2021, 17:10
Reviewer
Restricted Project
Differential Revision
D9441: [avalanche] improve stake generation in functional test
Parents
rABCb612be7f9aec: [Cashtab] load wallet from storage before calling API
Branches
Unknown
Tags
Unknown