]> Git Repo - VerusCoin.git/blob - src/utiltest.h
Fix stakeguard validation
[VerusCoin.git] / src / utiltest.h
1 // Copyright (c) 2016 The Zcash developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or https://www.opensource.org/licenses/mit-license.php .
4
5 #ifndef ZCASH_UTIL_TEST_H
6 #define ZCASH_UTIL_TEST_H
7
8 #include "key_io.h"
9 #include "wallet/wallet.h"
10 #include "zcash/JoinSplit.hpp"
11 #include "zcash/Note.hpp"
12 #include "zcash/NoteEncryption.hpp"
13 #include "zcash/zip32.h"
14
15 // Sprout
16 CWalletTx GetValidSproutReceive(ZCJoinSplit& params,
17                                 const libzcash::SproutSpendingKey& sk,
18                                 CAmount value,
19                                 bool randomInputs,
20                                 int32_t version = 2);
21 CWalletTx GetInvalidCommitmentSproutReceive(ZCJoinSplit& params,
22                                 const libzcash::SproutSpendingKey& sk,
23                                 CAmount value,
24                                 bool randomInputs,
25                                 int32_t version = 2);
26 libzcash::SproutNote GetSproutNote(ZCJoinSplit& params,
27                                    const libzcash::SproutSpendingKey& sk,
28                                    const CTransaction& tx, size_t js, size_t n);
29 CWalletTx GetValidSproutSpend(ZCJoinSplit& params,
30                               const libzcash::SproutSpendingKey& sk,
31                               const libzcash::SproutNote& note,
32                               CAmount value);
33
34 // Sapling
35 static const std::string T_SECRET_REGTEST = "cND2ZvtabDbJ1gucx9GWH6XT9kgTAqfb6cotPt5Q5CyxVDhid2EN";
36
37 struct TestSaplingNote {
38     libzcash::SaplingNote note;
39     SaplingMerkleTree tree;
40 };
41
42 const Consensus::Params& RegtestActivateSapling();
43
44 void RegtestDeactivateSapling();
45
46 const Consensus::Params& RegtestActivateBlossom(bool updatePow, int blossomActivationHeight = Consensus::NetworkUpgrade::ALWAYS_ACTIVE);
47
48 void RegtestDeactivateBlossom();
49
50 libzcash::SaplingExtendedSpendingKey GetTestMasterSaplingSpendingKey();
51
52 CKey AddTestCKeyToKeyStore(CBasicKeyStore& keyStore);
53
54 /**
55  * Generate a dummy SaplingNote and a SaplingMerkleTree with that note's commitment.
56  */
57 TestSaplingNote GetTestSaplingNote(const libzcash::SaplingPaymentAddress& pa, CAmount value);
58
59 CWalletTx GetValidSaplingReceive(const Consensus::Params& consensusParams,
60                                  CBasicKeyStore& keyStore,
61                                  const libzcash::SaplingExtendedSpendingKey &sk,
62                                  CAmount value);
63
64 #endif // ZCASH_UTIL_TEST_H
This page took 0.024371 seconds and 4 git commands to generate.