KOMODO_EARLYTXID_HEIGHT
This commit is contained in:
@@ -2072,7 +2072,7 @@ bool komodo_appendACscriptpub()
|
||||
{
|
||||
CTransaction tx; uint256 blockhash;
|
||||
// get transaction and check that it occured before height 100.
|
||||
if ( myGetTransaction(KOMODO_EARLYTXID,tx,blockhash) && mapBlockIndex[blockhash]->GetHeight() < 100 )
|
||||
if ( myGetTransaction(KOMODO_EARLYTXID,tx,blockhash) && mapBlockIndex[blockhash]->GetHeight() < KOMODO_EARLYTXID_HEIGHT )
|
||||
{
|
||||
for (int i = 0; i < tx.vout.size(); i++)
|
||||
{
|
||||
@@ -2107,15 +2107,15 @@ void GetKomodoEarlytxidScriptPub()
|
||||
StartShutdown();
|
||||
return;
|
||||
}
|
||||
if ( chainActive.Height() < 100 )
|
||||
if ( chainActive.Height() < KOMODO_EARLYTXID_HEIGHT )
|
||||
{
|
||||
fprintf(stderr, "Cannot fetch -earlytxid before block 100.\n");
|
||||
fprintf(stderr, "Cannot fetch -earlytxid before block %d.\n",KOMODO_EARLYTXID_HEIGHT);
|
||||
StartShutdown();
|
||||
return;
|
||||
}
|
||||
CTransaction tx; uint256 blockhash; int32_t i;
|
||||
// get transaction and check that it occured before height 100.
|
||||
if ( myGetTransaction(KOMODO_EARLYTXID,tx,blockhash) && mapBlockIndex[blockhash]->GetHeight() < 100 )
|
||||
if ( myGetTransaction(KOMODO_EARLYTXID,tx,blockhash) && mapBlockIndex[blockhash]->GetHeight() < KOMODO_EARLYTXID_HEIGHT )
|
||||
{
|
||||
for (i = 0; i < tx.vout.size(); i++)
|
||||
if ( tx.vout[i].scriptPubKey[0] == OP_RETURN )
|
||||
@@ -2156,7 +2156,7 @@ int64_t komodo_checkcommission(CBlock *pblock,int32_t height)
|
||||
if ( ASSETCHAINS_SCRIPTPUB.size() > 1 )
|
||||
{
|
||||
static bool didinit = false;
|
||||
if ( !didinit && height > 100 && KOMODO_EARLYTXID != zeroid && komodo_appendACscriptpub() )
|
||||
if ( !didinit && height > KOMODO_EARLYTXID_HEIGHT && KOMODO_EARLYTXID != zeroid && komodo_appendACscriptpub() )
|
||||
{
|
||||
fprintf(stderr, "appended CC_op_return to ASSETCHAINS_SCRIPTPUB.%s\n", ASSETCHAINS_SCRIPTPUB.c_str());
|
||||
didinit = true;
|
||||
|
||||
Reference in New Issue
Block a user