forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2492: [Consensus] v5.3 network upgrade.
1355b20 Validation: Add new multi-inputs and multi-empty-outputs coinstake rules. (furszy) 599bd42 Test: Add coinstake multi-inputs and multi-empty-outputs test coverage. (furszy) a195c2e [Test] Introduce PoS testing suite. (furszy) e98c1e8 Add and guard new max time window for mnb and mnp sigtime. (furszy) 7f8fb12 Introduce v5.3 network upgrade. (furszy) Pull request description: Grouped the consensus changes for the coming v5.3 upgrade. There is no enforcement height defined to not set it until everything is ready but.. we aren't far from be able to enforce it on testnet and start testing the release deeply, only have to merge #2411 and can be done. ACKs for top commit: random-zebra: ACK 1355b20 Fuzzbawls: ACK 1355b20 Tree-SHA512: 9282857e54f5a03ef43d9098a376bd403729304fb8a12be9a68c7dca4b6b29aba444f60158df1d50715f0b40db34225771f39770d05c9f9be16226cb4cb8975b
- Loading branch information
Showing
15 changed files
with
232 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) 2021 The PIVX developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or https://www.opensource.org/licenses/mit-license.php. | ||
|
||
#include "wallet/test/pos_test_fixture.h" | ||
#include "wallet/wallet.h" | ||
|
||
#include <boost/test/unit_test.hpp> | ||
|
||
TestPoSChainSetup::TestPoSChainSetup() : TestChainSetup(0) | ||
{ | ||
initZKSNARKS(); // init zk-snarks lib | ||
|
||
bool fFirstRun; | ||
pwalletMain = std::make_unique<CWallet>("testWallet", CWalletDBWrapper::CreateMock()); | ||
pwalletMain->LoadWallet(fFirstRun); | ||
RegisterValidationInterface(pwalletMain.get()); | ||
|
||
{ | ||
LOCK(pwalletMain->cs_wallet); | ||
pwalletMain->SetMinVersion(FEATURE_SAPLING); | ||
gArgs.ForceSetArg("-keypool", "5"); | ||
pwalletMain->SetupSPKM(true); | ||
|
||
// import coinbase key used to generate the 100-blocks chain | ||
BOOST_CHECK(pwalletMain->AddKeyPubKey(coinbaseKey, coinbaseKey.GetPubKey())); | ||
} | ||
|
||
int posActivation = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_POS].nActivationHeight - 1; | ||
for (int i = 0; i < posActivation; i++) { | ||
CBlock b = CreateAndProcessBlock({}, coinbaseKey); | ||
coinbaseTxns.emplace_back(*b.vtx[0]); | ||
} | ||
} | ||
|
||
TestPoSChainSetup::~TestPoSChainSetup() | ||
{ | ||
SyncWithValidationInterfaceQueue(); | ||
UnregisterValidationInterface(pwalletMain.get()); | ||
} |
Oops, something went wrong.