Page MenuHomePhabricator

decouple miner fund from `bitcoincash:` prefix and fix test
AbandonedPublic

Authored by majcosta on Dec 15 2020, 20:08.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

Starting to decouple tests from a specific CashAddr prefix, hardcode the _scriptPubKey_ of the miner fund instead of bitcoincash:pqnqv9lt7e5vjyp0w88zf2af0l92l8rxdgnlxww9j9

also test the miner fund against the address reported by the getblocktemplate RPC instead of hardcoding it in the test. that required spinning an additional node for the test, otherwise gbt fails with "Bitcoin is not connected!"

Test Plan
ninja all
test_runner.py abc_feature_minerfund

edit src/chainparams.cpp cashAddrPrefixes to abc:, abctest:, abcreg: and
repeat test plan, should also pass

Diff Detail

Repository
rABC Bitcoin ABC
Branch
miner_fund_test_against_getblocktemplate
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14428
Build 28824: Build Difflint-circular-dependencies · build-without-wallet · build-debug · build-clang-tidy · build-diff · build-clang
Build 28823: arc lint + arc unit

Event Timeline

majcosta retitled this revision from [tests] test minerfund against getblocktemplate outputted address to [tests] decouple miner fund from `bitcoincash:` prefix and fix test.
majcosta edited the summary of this revision. (Show Details)
majcosta edited the test plan for this revision. (Show Details)

decoupled miner fund destination from any specific CashAddr prefix

majcosta published this revision for review.Dec 15 2020, 22:33
majcosta retitled this revision from [tests] decouple miner fund from `bitcoincash:` prefix and fix test to [minerfund] decouple miner fund from `bitcoincash:` prefix and fix test.Dec 15 2020, 22:37
majcosta retitled this revision from [minerfund] decouple miner fund from `bitcoincash:` prefix and fix test to decouple miner fund from `bitcoincash:` prefix and fix test.
deadalnix requested changes to this revision.Dec 16 2020, 17:10
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/minerfund.cpp
29 ↗(On Diff #26384)

making the initialization static ensures it doesn't get reinitialized again and again.

test/functional/abc_feature_minerfund.py
27 ↗(On Diff #26384)

That doesn't seem necessary.

This revision now requires changes to proceed.Dec 16 2020, 17:10

this is a bit pointless now