More time lock checking... not finished
This commit is contained in:
17
src/main.cpp
17
src/main.cpp
@@ -964,11 +964,24 @@ bool ContextualCheckTransaction(const CTransaction& tx, CValidationState &state,
|
||||
}
|
||||
}
|
||||
|
||||
if (tx.IsCoinBase() && tx.vout[0].nValue >= ASSETCHAINS_TIMELOCKGTE)
|
||||
if (tx.IsCoinBase())
|
||||
{
|
||||
// if time locks are on, ensure that this coin base is time locked exactly as it should be
|
||||
int total = 0, int i;
|
||||
uint8_t script[256], scriptHash160[20];
|
||||
|
||||
for (i = 0; total += tx.vout[i].IsNull() ? 0 : tx.vout[i].nValue, i < tx.vout.size; i++);
|
||||
|
||||
// if time locks are on, ensure that this coin base is time locked exactly as it should be
|
||||
if (total >= ASSETCHAINS_TIMELOCKGTE)
|
||||
{
|
||||
for (i = 0; i < tx.vout.size; i++)
|
||||
{
|
||||
// validate that the outputs are locked by the proper time lock script
|
||||
//uint64_t i = komodo_block_timelockscript(script, scriptHash160, tx.addr/*need address*/)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user