aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2011-10-13 16:03:58 -0400
committerGavin Andresen <[email protected]>2011-12-19 13:24:48 -0500
commitd7062ef1bd3319689d402027131f2c46efeddcb6 (patch)
tree975b65f6410e515c4463ad15f1f306909337987b /src/main.cpp
parentOP_EVAL implementation (diff)
downloaddiscoin-d7062ef1bd3319689d402027131f2c46efeddcb6.tar.xz
discoin-d7062ef1bd3319689d402027131f2c46efeddcb6.zip
Put OP_EVAL string in coinbase of generated blocks
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0fb383f59..1b5bf5280 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2999,6 +2999,13 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
}
++nExtraNonce;
pblock->vtx[0].vin[0].scriptSig = CScript() << pblock->nTime << CBigNum(nExtraNonce);
+
+ // Put "OP_EVAL" in the coinbase so everybody can tell when
+ // a majority of miners support it
+ const char* pOpEvalName = GetOpName(OP_EVAL);
+ pblock->vtx[0].vin[0].scriptSig += CScript() << std::vector<unsigned char>(pOpEvalName, pOpEvalName+strlen(pOpEvalName));
+ assert(pblock->vtx[0].vin[0].scriptSig.size() <= 100);
+
pblock->hashMerkleRoot = pblock->BuildMerkleTree();
}