mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Set policy asset for core unit tests
This commit is contained in:
parent
9644d663f6
commit
2bf55e1d0a
2 changed files with 5 additions and 2 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include "consensus/consensus.h"
|
||||
#include "consensus/validation.h"
|
||||
#include "consensus/merkle.h"
|
||||
#include "policy/policy.h"
|
||||
#include "key.h"
|
||||
#include "validation.h"
|
||||
#include "miner.h"
|
||||
|
|
@ -54,6 +55,8 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::st
|
|||
// MAX_MONEY
|
||||
SoftSetArg("-initialfreecoins", "2100000000000000");
|
||||
SelectParams(chainName);
|
||||
// Set policy asset for correct fee output generation
|
||||
policyAsset = CAsset(uint256S(Params().GetConsensus().pegged_asset.GetHex()));
|
||||
noui_connect();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
|
|||
spends[i].vin[0].prevout.hash = coinbaseTxns[0].GetHash();
|
||||
spends[i].vin[0].prevout.n = 0;
|
||||
spends[i].vout.resize(2);
|
||||
spends[i].vout[0].nValue = 11*CENT;
|
||||
spends[i].vout[0].nValue = MAX_MONEY-11*CENT;
|
||||
spends[i].vout[0].scriptPubKey = scriptPubKey;
|
||||
spends[i].vout[0].nAsset = Params().GetConsensus().pegged_asset;
|
||||
spends[i].vout[1].nValue = MAX_MONEY-11*CENT;
|
||||
spends[i].vout[1].nValue = 11*CENT;
|
||||
spends[i].vout[1].nAsset = Params().GetConsensus().pegged_asset;
|
||||
spends[i].vout[1].scriptPubKey = CScript();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue