Page MenuHomePhabricator

D545.id1382.diff
No OneTemporary

D545.id1382.diff

diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp
--- a/src/test/txvalidationcache_tests.cpp
+++ b/src/test/txvalidationcache_tests.cpp
@@ -174,17 +174,17 @@
spend_tx.vin[0].prevout.hash = coinbaseTxns[0].GetId();
spend_tx.vin[0].prevout.n = 0;
spend_tx.vout.resize(4);
- spend_tx.vout[0].nValue = 11 * CENT;
+ spend_tx.vout[0].nValue = 11 * CENT.GetSatoshis();
spend_tx.vout[0].scriptPubKey = p2sh_scriptPubKey;
- spend_tx.vout[1].nValue = 11 * CENT;
+ spend_tx.vout[1].nValue = 11 * CENT.GetSatoshis();
spend_tx.vout[1].scriptPubKey =
CScript() << OP_CHECKLOCKTIMEVERIFY << OP_DROP
<< ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;
- spend_tx.vout[2].nValue = 11 * CENT;
+ spend_tx.vout[2].nValue = 11 * CENT.GetSatoshis();
spend_tx.vout[2].scriptPubKey =
CScript() << OP_CHECKSEQUENCEVERIFY << OP_DROP
<< ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;
- spend_tx.vout[3].nValue = 11 * CENT;
+ spend_tx.vout[3].nValue = 11 * CENT.GetSatoshis();
spend_tx.vout[3].scriptPubKey = p2sh_scriptPubKey;
// Sign, with a non-DER signature
@@ -249,7 +249,7 @@
invalid_under_p2sh_tx.vin[0].prevout.hash = spend_tx.GetId();
invalid_under_p2sh_tx.vin[0].prevout.n = 0;
invalid_under_p2sh_tx.vout.resize(1);
- invalid_under_p2sh_tx.vout[0].nValue = 11 * CENT;
+ invalid_under_p2sh_tx.vout[0].nValue = 11 * CENT.GetSatoshis();
invalid_under_p2sh_tx.vout[0].scriptPubKey = p2pk_scriptPubKey;
std::vector<uint8_t> vchSig2(p2pk_scriptPubKey.begin(),
p2pk_scriptPubKey.end());
@@ -269,7 +269,7 @@
invalid_with_cltv_tx.vin[0].prevout.n = 1;
invalid_with_cltv_tx.vin[0].nSequence = 0;
invalid_with_cltv_tx.vout.resize(1);
- invalid_with_cltv_tx.vout[0].nValue = 11 * CENT;
+ invalid_with_cltv_tx.vout[0].nValue = 11 * CENT.GetSatoshis();
invalid_with_cltv_tx.vout[0].scriptPubKey = p2pk_scriptPubKey;
// Sign
@@ -304,7 +304,7 @@
invalid_with_csv_tx.vin[0].prevout.n = 2;
invalid_with_csv_tx.vin[0].nSequence = 100;
invalid_with_csv_tx.vout.resize(1);
- invalid_with_csv_tx.vout[0].nValue = 11 * CENT;
+ invalid_with_csv_tx.vout[0].nValue = 11 * CENT.GetSatoshis();
invalid_with_csv_tx.vout[0].scriptPubKey = p2pk_scriptPubKey;
// Sign
@@ -342,20 +342,20 @@
tx.vin[1].prevout.hash = spend_tx.GetId();
tx.vin[1].prevout.n = 3;
tx.vout.resize(1);
- tx.vout[0].nValue = 22 * CENT;
+ tx.vout[0].nValue = 22 * CENT.GetSatoshis();
tx.vout[0].scriptPubKey = p2pk_scriptPubKey;
// Sign
SignatureData sigdata;
- ProduceSignature(
- MutableTransactionSignatureCreator(&keystore, &tx, 0, 11 * CENT,
- SIGHASH_ALL | SIGHASH_FORKID),
- spend_tx.vout[0].scriptPubKey, sigdata);
+ ProduceSignature(MutableTransactionSignatureCreator(
+ &keystore, &tx, 0, 11 * CENT.GetSatoshis(),
+ SIGHASH_ALL | SIGHASH_FORKID),
+ spend_tx.vout[0].scriptPubKey, sigdata);
UpdateTransaction(tx, 0, sigdata);
- ProduceSignature(
- MutableTransactionSignatureCreator(&keystore, &tx, 1, 11 * CENT,
- SIGHASH_ALL | SIGHASH_FORKID),
- spend_tx.vout[3].scriptPubKey, sigdata);
+ ProduceSignature(MutableTransactionSignatureCreator(
+ &keystore, &tx, 1, 11 * CENT.GetSatoshis(),
+ SIGHASH_ALL | SIGHASH_FORKID),
+ spend_tx.vout[3].scriptPubKey, sigdata);
UpdateTransaction(tx, 1, sigdata);
// This should be valid under all script flags

File Metadata

Mime Type
text/plain
Expires
Tue, May 20, 20:18 (14 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865859
Default Alt Text
D545.id1382.diff (3 KB)

Event Timeline