mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
misc
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@43 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
parent
107d9e288d
commit
b075bbf986
1 changed files with 5 additions and 9 deletions
12
main.cpp
12
main.cpp
|
@ -1254,8 +1254,8 @@ bool CBlock::AcceptBlock()
|
||||||
if (nTime <= pindexPrev->GetMedianTimePast())
|
if (nTime <= pindexPrev->GetMedianTimePast())
|
||||||
return error("AcceptBlock() : block's timestamp is too early");
|
return error("AcceptBlock() : block's timestamp is too early");
|
||||||
|
|
||||||
// Check that all transactions are finalized (starting around Dec 2009)
|
// Check that all transactions are finalized (starting around Mar 2010)
|
||||||
if (nBestHeight > 31000)
|
if (nBestHeight > 36000)
|
||||||
foreach(const CTransaction& tx, vtx)
|
foreach(const CTransaction& tx, vtx)
|
||||||
if (!tx.IsFinal(nTime))
|
if (!tx.IsFinal(nTime))
|
||||||
return error("AcceptBlock() : contains a non-final transaction");
|
return error("AcceptBlock() : contains a non-final transaction");
|
||||||
|
@ -2059,12 +2059,8 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||||
vRecv >> *pblock;
|
vRecv >> *pblock;
|
||||||
|
|
||||||
//// debug print
|
//// debug print
|
||||||
if (false)
|
// printf("received block:\n");
|
||||||
{
|
// pblock->print();
|
||||||
printf("received block:\n");
|
|
||||||
pblock->print();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
printf("received block %s\n", pblock->GetHash().ToString().substr(0,16).c_str());
|
printf("received block %s\n", pblock->GetHash().ToString().substr(0,16).c_str());
|
||||||
|
|
||||||
CInv inv(MSG_BLOCK, pblock->GetHash());
|
CInv inv(MSG_BLOCK, pblock->GetHash());
|
||||||
|
|
Loading…
Add table
Reference in a new issue