|
|
@ -71,7 +71,7 @@ bool BlockQueue::import(bytesConstRef _block, BlockChain const& _bc) |
|
|
|
} |
|
|
|
|
|
|
|
// Check it's not crazy
|
|
|
|
if (bi.timestamp > (u256)time(0)) |
|
|
|
if (bi.timestamp > (u256)time(0) - 10) |
|
|
|
{ |
|
|
|
cnote << "Invalid timestamp."; |
|
|
|
return false; |
|
|
@ -84,14 +84,14 @@ bool BlockQueue::import(bytesConstRef _block, BlockChain const& _bc) |
|
|
|
if (!m_readySet.count(bi.parentHash) && !m_drainingSet.count(bi.parentHash) && !_bc.details(bi.parentHash)) |
|
|
|
{ |
|
|
|
// We don't know the parent (yet) - queue it up for later. It'll get resent to us if we find out about its ancestry later on.
|
|
|
|
cnote << "OK - queued for future."; |
|
|
|
// cnote << "OK - queued for future.";
|
|
|
|
m_future.insert(make_pair(bi.parentHash, make_pair(h, _block.toBytes()))); |
|
|
|
m_futureSet.insert(h); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
// If valid, append to blocks.
|
|
|
|
cnote << "OK - ready for chain insertion."; |
|
|
|
// cnote << "OK - ready for chain insertion.";
|
|
|
|
m_ready.push_back(_block.toBytes()); |
|
|
|
m_readySet.insert(h); |
|
|
|
|
|
|
|