|
|
@ -297,7 +297,7 @@ bool AddOrphanTx(const CDataStream& vMsg) |
|
|
|
// at most 500 megabytes of orphans:
|
|
|
|
// at most 500 megabytes of orphans:
|
|
|
|
if (pvMsg->size() > 5000) |
|
|
|
if (pvMsg->size() > 5000) |
|
|
|
{ |
|
|
|
{ |
|
|
|
printf("ignoring large orphan tx (size: %"PRIszu", hash: %s)\n", pvMsg->size(), hash.ToString().substr(0,10).c_str()); |
|
|
|
printf("ignoring large orphan tx (size: %"PRIszu", hash: %s)\n", pvMsg->size(), hash.ToString().c_str()); |
|
|
|
delete pvMsg; |
|
|
|
delete pvMsg; |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -306,7 +306,7 @@ bool AddOrphanTx(const CDataStream& vMsg) |
|
|
|
BOOST_FOREACH(const CTxIn& txin, tx.vin) |
|
|
|
BOOST_FOREACH(const CTxIn& txin, tx.vin) |
|
|
|
mapOrphanTransactionsByPrev[txin.prevout.hash].insert(make_pair(hash, pvMsg)); |
|
|
|
mapOrphanTransactionsByPrev[txin.prevout.hash].insert(make_pair(hash, pvMsg)); |
|
|
|
|
|
|
|
|
|
|
|
printf("stored orphan tx %s (mapsz %"PRIszu")\n", hash.ToString().substr(0,10).c_str(), |
|
|
|
printf("stored orphan tx %s (mapsz %"PRIszu")\n", hash.ToString().c_str(), |
|
|
|
mapOrphanTransactions.size()); |
|
|
|
mapOrphanTransactions.size()); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -770,7 +770,7 @@ bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fCheckIn |
|
|
|
// This is done last to help prevent CPU exhaustion denial-of-service attacks.
|
|
|
|
// This is done last to help prevent CPU exhaustion denial-of-service attacks.
|
|
|
|
if (!tx.CheckInputs(state, view, true, SCRIPT_VERIFY_P2SH)) |
|
|
|
if (!tx.CheckInputs(state, view, true, SCRIPT_VERIFY_P2SH)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return error("CTxMemPool::accept() : ConnectInputs failed %s", hash.ToString().substr(0,10).c_str()); |
|
|
|
return error("CTxMemPool::accept() : ConnectInputs failed %s", hash.ToString().c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -792,7 +792,7 @@ bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fCheckIn |
|
|
|
SyncWithWallets(hash, tx, NULL, true); |
|
|
|
SyncWithWallets(hash, tx, NULL, true); |
|
|
|
|
|
|
|
|
|
|
|
printf("CTxMemPool::accept() : accepted %s (poolsz %"PRIszu")\n", |
|
|
|
printf("CTxMemPool::accept() : accepted %s (poolsz %"PRIszu")\n", |
|
|
|
hash.ToString().substr(0,10).c_str(), |
|
|
|
hash.ToString().c_str(), |
|
|
|
mapTx.size()); |
|
|
|
mapTx.size()); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -1198,11 +1198,11 @@ void static InvalidChainFound(CBlockIndex* pindexNew) |
|
|
|
uiInterface.NotifyBlocksChanged(); |
|
|
|
uiInterface.NotifyBlocksChanged(); |
|
|
|
} |
|
|
|
} |
|
|
|
printf("InvalidChainFound: invalid block=%s height=%d work=%s date=%s\n", |
|
|
|
printf("InvalidChainFound: invalid block=%s height=%d work=%s date=%s\n", |
|
|
|
BlockHashStr(pindexNew->GetBlockHash()).c_str(), pindexNew->nHeight, |
|
|
|
pindexNew->GetBlockHash().ToString().c_str(), pindexNew->nHeight, |
|
|
|
pindexNew->bnChainWork.ToString().c_str(), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", |
|
|
|
pindexNew->bnChainWork.ToString().c_str(), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", |
|
|
|
pindexNew->GetBlockTime()).c_str()); |
|
|
|
pindexNew->GetBlockTime()).c_str()); |
|
|
|
printf("InvalidChainFound: current best=%s height=%d work=%s date=%s\n", |
|
|
|
printf("InvalidChainFound: current best=%s height=%d work=%s date=%s\n", |
|
|
|
BlockHashStr(hashBestChain).c_str(), nBestHeight, bnBestChainWork.ToString().c_str(), |
|
|
|
hashBestChain.ToString().c_str(), nBestHeight, bnBestChainWork.ToString().c_str(), |
|
|
|
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str()); |
|
|
|
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str()); |
|
|
|
if (pindexBest && bnBestInvalidWork > bnBestChainWork + pindexBest->GetBlockWork() * 6) |
|
|
|
if (pindexBest && bnBestInvalidWork > bnBestChainWork + pindexBest->GetBlockWork() * 6) |
|
|
|
printf("InvalidChainFound: Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.\n"); |
|
|
|
printf("InvalidChainFound: Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.\n"); |
|
|
@ -1366,7 +1366,7 @@ bool CTransaction::HaveInputs(CCoinsViewCache &inputs) const |
|
|
|
bool CScriptCheck::operator()() const { |
|
|
|
bool CScriptCheck::operator()() const { |
|
|
|
const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; |
|
|
|
const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; |
|
|
|
if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags, nHashType)) |
|
|
|
if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags, nHashType)) |
|
|
|
return error("CScriptCheck() : %s VerifySignature failed", ptxTo->GetHash().ToString().substr(0,10).c_str()); |
|
|
|
return error("CScriptCheck() : %s VerifySignature failed", ptxTo->GetHash().ToString().c_str()); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1385,7 +1385,7 @@ bool CTransaction::CheckInputs(CValidationState &state, CCoinsViewCache &inputs, |
|
|
|
// This doesn't trigger the DoS code on purpose; if it did, it would make it easier
|
|
|
|
// This doesn't trigger the DoS code on purpose; if it did, it would make it easier
|
|
|
|
// for an attacker to attempt to split the network.
|
|
|
|
// for an attacker to attempt to split the network.
|
|
|
|
if (!HaveInputs(inputs)) |
|
|
|
if (!HaveInputs(inputs)) |
|
|
|
return state.Invalid(error("CheckInputs() : %s inputs unavailable", GetHash().ToString().substr(0,10).c_str())); |
|
|
|
return state.Invalid(error("CheckInputs() : %s inputs unavailable", GetHash().ToString().c_str())); |
|
|
|
|
|
|
|
|
|
|
|
// While checking, GetBestBlock() refers to the parent block.
|
|
|
|
// While checking, GetBestBlock() refers to the parent block.
|
|
|
|
// This is also true for mempool checks.
|
|
|
|
// This is also true for mempool checks.
|
|
|
@ -1411,12 +1411,12 @@ bool CTransaction::CheckInputs(CValidationState &state, CCoinsViewCache &inputs, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (nValueIn < GetValueOut()) |
|
|
|
if (nValueIn < GetValueOut()) |
|
|
|
return state.DoS(100, error("CheckInputs() : %s value in < value out", GetHash().ToString().substr(0,10).c_str())); |
|
|
|
return state.DoS(100, error("CheckInputs() : %s value in < value out", GetHash().ToString().c_str())); |
|
|
|
|
|
|
|
|
|
|
|
// Tally transaction fees
|
|
|
|
// Tally transaction fees
|
|
|
|
int64 nTxFee = nValueIn - GetValueOut(); |
|
|
|
int64 nTxFee = nValueIn - GetValueOut(); |
|
|
|
if (nTxFee < 0) |
|
|
|
if (nTxFee < 0) |
|
|
|
return state.DoS(100, error("CheckInputs() : %s nTxFee < 0", GetHash().ToString().substr(0,10).c_str())); |
|
|
|
return state.DoS(100, error("CheckInputs() : %s nTxFee < 0", GetHash().ToString().c_str())); |
|
|
|
nFees += nTxFee; |
|
|
|
nFees += nTxFee; |
|
|
|
if (!MoneyRange(nFees)) |
|
|
|
if (!MoneyRange(nFees)) |
|
|
|
return state.DoS(100, error("CheckInputs() : nFees out of range")); |
|
|
|
return state.DoS(100, error("CheckInputs() : nFees out of range")); |
|
|
@ -1750,8 +1750,8 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew) |
|
|
|
reverse(vConnect.begin(), vConnect.end()); |
|
|
|
reverse(vConnect.begin(), vConnect.end()); |
|
|
|
|
|
|
|
|
|
|
|
if (vDisconnect.size() > 0) { |
|
|
|
if (vDisconnect.size() > 0) { |
|
|
|
printf("REORGANIZE: Disconnect %"PRIszu" blocks; %s..%s\n", vDisconnect.size(), BlockHashStr(pfork->GetBlockHash()).c_str(), BlockHashStr(pindexBest->GetBlockHash()).c_str()); |
|
|
|
printf("REORGANIZE: Disconnect %"PRIszu" blocks; %s..\n", vDisconnect.size(), pfork->GetBlockHash().ToString().c_str()); |
|
|
|
printf("REORGANIZE: Connect %"PRIszu" blocks; %s..%s\n", vConnect.size(), BlockHashStr(pfork->GetBlockHash()).c_str(), BlockHashStr(pindexNew->GetBlockHash()).c_str()); |
|
|
|
printf("REORGANIZE: Connect %"PRIszu" blocks; ..%s\n", vConnect.size(), pindexNew->GetBlockHash().ToString().c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Disconnect shorter branch
|
|
|
|
// Disconnect shorter branch
|
|
|
@ -1762,7 +1762,7 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew) |
|
|
|
return state.Abort(_("Failed to read block")); |
|
|
|
return state.Abort(_("Failed to read block")); |
|
|
|
int64 nStart = GetTimeMicros(); |
|
|
|
int64 nStart = GetTimeMicros(); |
|
|
|
if (!block.DisconnectBlock(state, pindex, view)) |
|
|
|
if (!block.DisconnectBlock(state, pindex, view)) |
|
|
|
return error("SetBestBlock() : DisconnectBlock %s failed", BlockHashStr(pindex->GetBlockHash()).c_str()); |
|
|
|
return error("SetBestBlock() : DisconnectBlock %s failed", pindex->GetBlockHash().ToString().c_str()); |
|
|
|
if (fBenchmark) |
|
|
|
if (fBenchmark) |
|
|
|
printf("- Disconnect: %.2fms\n", (GetTimeMicros() - nStart) * 0.001); |
|
|
|
printf("- Disconnect: %.2fms\n", (GetTimeMicros() - nStart) * 0.001); |
|
|
|
|
|
|
|
|
|
|
@ -1786,7 +1786,7 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew) |
|
|
|
InvalidChainFound(pindexNew); |
|
|
|
InvalidChainFound(pindexNew); |
|
|
|
InvalidBlockFound(pindex); |
|
|
|
InvalidBlockFound(pindex); |
|
|
|
} |
|
|
|
} |
|
|
|
return error("SetBestBlock() : ConnectBlock %s failed", BlockHashStr(pindex->GetBlockHash()).c_str()); |
|
|
|
return error("SetBestBlock() : ConnectBlock %s failed", pindex->GetBlockHash().ToString().c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (fBenchmark) |
|
|
|
if (fBenchmark) |
|
|
|
printf("- Connect: %.2fms\n", (GetTimeMicros() - nStart) * 0.001); |
|
|
|
printf("- Connect: %.2fms\n", (GetTimeMicros() - nStart) * 0.001); |
|
|
@ -1862,7 +1862,7 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew) |
|
|
|
nTimeBestReceived = GetTime(); |
|
|
|
nTimeBestReceived = GetTime(); |
|
|
|
nTransactionsUpdated++; |
|
|
|
nTransactionsUpdated++; |
|
|
|
printf("SetBestChain: new best=%s height=%d work=%s tx=%lu date=%s progress=%f\n", |
|
|
|
printf("SetBestChain: new best=%s height=%d work=%s tx=%lu date=%s progress=%f\n", |
|
|
|
BlockHashStr(hashBestChain).c_str(), nBestHeight, bnBestChainWork.ToString().c_str(), (unsigned long)pindexNew->nChainTx, |
|
|
|
hashBestChain.ToString().c_str(), nBestHeight, bnBestChainWork.ToString().c_str(), (unsigned long)pindexNew->nChainTx, |
|
|
|
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str(), |
|
|
|
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str(), |
|
|
|
Checkpoints::GuessVerificationProgress(pindexBest)); |
|
|
|
Checkpoints::GuessVerificationProgress(pindexBest)); |
|
|
|
|
|
|
|
|
|
|
@ -1901,7 +1901,7 @@ bool CBlock::AddToBlockIndex(CValidationState &state, const CDiskBlockPos &pos) |
|
|
|
// Check for duplicate
|
|
|
|
// Check for duplicate
|
|
|
|
uint256 hash = GetHash(); |
|
|
|
uint256 hash = GetHash(); |
|
|
|
if (mapBlockIndex.count(hash)) |
|
|
|
if (mapBlockIndex.count(hash)) |
|
|
|
return state.Invalid(error("AddToBlockIndex() : %s already exists", BlockHashStr(hash).c_str())); |
|
|
|
return state.Invalid(error("AddToBlockIndex() : %s already exists", hash.ToString().c_str())); |
|
|
|
|
|
|
|
|
|
|
|
// Construct new block index object
|
|
|
|
// Construct new block index object
|
|
|
|
CBlockIndex* pindexNew = new CBlockIndex(*this); |
|
|
|
CBlockIndex* pindexNew = new CBlockIndex(*this); |
|
|
@ -2222,9 +2222,9 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl |
|
|
|
// Check for duplicate
|
|
|
|
// Check for duplicate
|
|
|
|
uint256 hash = pblock->GetHash(); |
|
|
|
uint256 hash = pblock->GetHash(); |
|
|
|
if (mapBlockIndex.count(hash)) |
|
|
|
if (mapBlockIndex.count(hash)) |
|
|
|
return state.Invalid(error("ProcessBlock() : already have block %d %s", mapBlockIndex[hash]->nHeight, BlockHashStr(hash).c_str())); |
|
|
|
return state.Invalid(error("ProcessBlock() : already have block %d %s", mapBlockIndex[hash]->nHeight, hash.ToString().c_str())); |
|
|
|
if (mapOrphanBlocks.count(hash)) |
|
|
|
if (mapOrphanBlocks.count(hash)) |
|
|
|
return state.Invalid(error("ProcessBlock() : already have block (orphan) %s", BlockHashStr(hash).c_str())); |
|
|
|
return state.Invalid(error("ProcessBlock() : already have block (orphan) %s", hash.ToString().c_str())); |
|
|
|
|
|
|
|
|
|
|
|
// Preliminary checks
|
|
|
|
// Preliminary checks
|
|
|
|
if (!pblock->CheckBlock(state)) |
|
|
|
if (!pblock->CheckBlock(state)) |
|
|
@ -2253,7 +2253,7 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl |
|
|
|
// If we don't already have its previous block, shunt it off to holding area until we get it
|
|
|
|
// If we don't already have its previous block, shunt it off to holding area until we get it
|
|
|
|
if (pblock->hashPrevBlock != 0 && !mapBlockIndex.count(pblock->hashPrevBlock)) |
|
|
|
if (pblock->hashPrevBlock != 0 && !mapBlockIndex.count(pblock->hashPrevBlock)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
printf("ProcessBlock: ORPHAN BLOCK, prev=%s\n", BlockHashStr(pblock->hashPrevBlock).c_str()); |
|
|
|
printf("ProcessBlock: ORPHAN BLOCK, prev=%s\n", pblock->hashPrevBlock.ToString().c_str()); |
|
|
|
|
|
|
|
|
|
|
|
// Accept orphans as long as there is a node to request its parents from
|
|
|
|
// Accept orphans as long as there is a node to request its parents from
|
|
|
|
if (pfrom) { |
|
|
|
if (pfrom) { |
|
|
@ -2589,7 +2589,7 @@ bool static LoadBlockIndexDB() |
|
|
|
pindex = pindexPrev; |
|
|
|
pindex = pindexPrev; |
|
|
|
} |
|
|
|
} |
|
|
|
printf("LoadBlockIndexDB(): hashBestChain=%s height=%d date=%s\n", |
|
|
|
printf("LoadBlockIndexDB(): hashBestChain=%s height=%d date=%s\n", |
|
|
|
BlockHashStr(hashBestChain).c_str(), nBestHeight, |
|
|
|
hashBestChain.ToString().c_str(), nBestHeight, |
|
|
|
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str()); |
|
|
|
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str()); |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
@ -3414,12 +3414,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
|
|
|
if (pindex) |
|
|
|
if (pindex) |
|
|
|
pindex = pindex->pnext; |
|
|
|
pindex = pindex->pnext; |
|
|
|
int nLimit = 500; |
|
|
|
int nLimit = 500; |
|
|
|
printf("getblocks %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), BlockHashStr(hashStop).c_str(), nLimit); |
|
|
|
printf("getblocks %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().c_str(), nLimit); |
|
|
|
for (; pindex; pindex = pindex->pnext) |
|
|
|
for (; pindex; pindex = pindex->pnext) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (pindex->GetBlockHash() == hashStop) |
|
|
|
if (pindex->GetBlockHash() == hashStop) |
|
|
|
{ |
|
|
|
{ |
|
|
|
printf(" getblocks stopping at %d %s\n", pindex->nHeight, BlockHashStr(pindex->GetBlockHash()).c_str()); |
|
|
|
printf(" getblocks stopping at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str()); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash())); |
|
|
|
pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash())); |
|
|
@ -3427,7 +3427,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// When this block is requested, we'll send an inv that'll make them
|
|
|
|
// When this block is requested, we'll send an inv that'll make them
|
|
|
|
// getblocks the next batch of inventory.
|
|
|
|
// getblocks the next batch of inventory.
|
|
|
|
printf(" getblocks stopping at limit %d %s\n", pindex->nHeight, BlockHashStr(pindex->GetBlockHash()).c_str()); |
|
|
|
printf(" getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str()); |
|
|
|
pfrom->hashContinue = pindex->GetBlockHash(); |
|
|
|
pfrom->hashContinue = pindex->GetBlockHash(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
@ -3461,7 +3461,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
|
|
|
// we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end
|
|
|
|
// we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end
|
|
|
|
vector<CBlock> vHeaders; |
|
|
|
vector<CBlock> vHeaders; |
|
|
|
int nLimit = 2000; |
|
|
|
int nLimit = 2000; |
|
|
|
printf("getheaders %d to %s\n", (pindex ? pindex->nHeight : -1), BlockHashStr(hashStop).c_str()); |
|
|
|
printf("getheaders %d to %s\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().c_str()); |
|
|
|
for (; pindex; pindex = pindex->pnext) |
|
|
|
for (; pindex; pindex = pindex->pnext) |
|
|
|
{ |
|
|
|
{ |
|
|
|
vHeaders.push_back(pindex->GetBlockHeader()); |
|
|
|
vHeaders.push_back(pindex->GetBlockHeader()); |
|
|
@ -3510,7 +3510,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
|
|
|
|
|
|
|
|
|
|
|
if (tx.AcceptToMemoryPool(stateDummy, true, true, &fMissingInputs2)) |
|
|
|
if (tx.AcceptToMemoryPool(stateDummy, true, true, &fMissingInputs2)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
printf(" accepted orphan tx %s\n", inv.hash.ToString().substr(0,10).c_str()); |
|
|
|
printf(" accepted orphan tx %s\n", inv.hash.ToString().c_str()); |
|
|
|
RelayTransaction(tx, inv.hash, vMsg); |
|
|
|
RelayTransaction(tx, inv.hash, vMsg); |
|
|
|
mapAlreadyAskedFor.erase(inv); |
|
|
|
mapAlreadyAskedFor.erase(inv); |
|
|
|
vWorkQueue.push_back(inv.hash); |
|
|
|
vWorkQueue.push_back(inv.hash); |
|
|
@ -3520,7 +3520,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// invalid or too-little-fee orphan
|
|
|
|
// invalid or too-little-fee orphan
|
|
|
|
vEraseQueue.push_back(inv.hash); |
|
|
|
vEraseQueue.push_back(inv.hash); |
|
|
|
printf(" removed orphan tx %s\n", inv.hash.ToString().substr(0,10).c_str()); |
|
|
|
printf(" removed orphan tx %s\n", inv.hash.ToString().c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3548,7 +3548,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
|
|
|
CBlock block; |
|
|
|
CBlock block; |
|
|
|
vRecv >> block; |
|
|
|
vRecv >> block; |
|
|
|
|
|
|
|
|
|
|
|
printf("received block %s\n", BlockHashStr(block.GetHash()).c_str()); |
|
|
|
printf("received block %s\n", block.GetHash().ToString().c_str()); |
|
|
|
// block.print();
|
|
|
|
// block.print();
|
|
|
|
|
|
|
|
|
|
|
|
CInv inv(MSG_BLOCK, block.GetHash()); |
|
|
|
CInv inv(MSG_BLOCK, block.GetHash()); |
|
|
@ -4101,9 +4101,9 @@ public: |
|
|
|
void print() const |
|
|
|
void print() const |
|
|
|
{ |
|
|
|
{ |
|
|
|
printf("COrphan(hash=%s, dPriority=%.1f, dFeePerKb=%.1f)\n", |
|
|
|
printf("COrphan(hash=%s, dPriority=%.1f, dFeePerKb=%.1f)\n", |
|
|
|
ptx->GetHash().ToString().substr(0,10).c_str(), dPriority, dFeePerKb); |
|
|
|
ptx->GetHash().ToString().c_str(), dPriority, dFeePerKb); |
|
|
|
BOOST_FOREACH(uint256 hash, setDependsOn) |
|
|
|
BOOST_FOREACH(uint256 hash, setDependsOn) |
|
|
|
printf(" setDependsOn %s\n", hash.ToString().substr(0,10).c_str()); |
|
|
|
printf(" setDependsOn %s\n", hash.ToString().c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|