aboutsummaryrefslogtreecommitdiff
path: root/src/test/DoS_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-06-22 20:40:53 +0200
committerPieter Wuille <[email protected]>2014-06-22 20:45:30 +0200
commitd4e4e05435a93a72711120f46ee79482c13fae45 (patch)
treeaeb3e1ba960864e331b647abbfabe2ecb5a90c45 /src/test/DoS_tests.cpp
parentMerge pull request #4381 (diff)
parentCode simplifications after CTransaction::GetHash() caching (diff)
downloaddiscoin-d4e4e05435a93a72711120f46ee79482c13fae45.tar.xz
discoin-d4e4e05435a93a72711120f46ee79482c13fae45.zip
Merge pull request #4309
d38da59 Code simplifications after CTransaction::GetHash() caching (Pieter Wuille) 4949004 Add CMutableTransaction and make CTransaction immutable. (Pieter Wuille)
Diffstat (limited to 'src/test/DoS_tests.cpp')
-rw-r--r--src/test/DoS_tests.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index fb06fb343..3a4584441 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -167,7 +167,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
// 50 orphan transactions:
for (int i = 0; i < 50; i++)
{
- CTransaction tx;
+ CMutableTransaction tx;
tx.vin.resize(1);
tx.vin[0].prevout.n = 0;
tx.vin[0].prevout.hash = GetRandHash();
@@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
{
CTransaction txPrev = RandomOrphan();
- CTransaction tx;
+ CMutableTransaction tx;
tx.vin.resize(1);
tx.vin[0].prevout.n = 0;
tx.vin[0].prevout.hash = txPrev.GetHash();
@@ -201,7 +201,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
{
CTransaction txPrev = RandomOrphan();
- CTransaction tx;
+ CMutableTransaction tx;
tx.vout.resize(1);
tx.vout[0].nValue = 1*CENT;
tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
@@ -242,10 +242,10 @@ BOOST_AUTO_TEST_CASE(DoS_checkSig)
// 100 orphan transactions:
static const int NPREV=100;
- CTransaction orphans[NPREV];
+ CMutableTransaction orphans[NPREV];
for (int i = 0; i < NPREV; i++)
{
- CTransaction& tx = orphans[i];
+ CMutableTransaction& tx = orphans[i];
tx.vin.resize(1);
tx.vin[0].prevout.n = 0;
tx.vin[0].prevout.hash = GetRandHash();
@@ -258,7 +258,7 @@ BOOST_AUTO_TEST_CASE(DoS_checkSig)
}
// Create a transaction that depends on orphans:
- CTransaction tx;
+ CMutableTransaction tx;
tx.vout.resize(1);
tx.vout[0].nValue = 1*CENT;
tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());