minor changes

This commit is contained in:
Evan Duffield 2015-02-03 18:19:54 -07:00
parent d912f3466a
commit e3ef585263
2 changed files with 9 additions and 7 deletions

View File

@ -99,13 +99,14 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
// resolve conflicts // resolve conflicts
std::map<uint256, CTransactionLock>::iterator i = mapTxLocks.find(tx.GetHash()); std::map<uint256, CTransactionLock>::iterator i = mapTxLocks.find(tx.GetHash());
if (i != mapTxLocks.end()){ if (i != mapTxLocks.end()){
//we only care if we have a complete tx lock
if((*i).second.CountSignatures() >= INSTANTX_SIGNATURES_REQUIRED){ if((*i).second.CountSignatures() >= INSTANTX_SIGNATURES_REQUIRED){
LogPrintf("ProcessMessageInstantX::txlreq - Found Existing Complete IX Lock\n"); LogPrintf("ProcessMessageInstantX::txlreq - Found Existing Complete IX Lock\n");
uint256 txHash = (*i).second.txHash; uint256 txHash = (*i).second.txHash;
CValidationState state; CValidationState state;
bool fMissingInputs = false; bool fMissingInputs = false;
DisconnectBlockAndInputs(state, mapTxLockReqRejected[txHash]); DisconnectBlockAndInputs(state, tx);
if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs)) if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs))
{ {
@ -121,8 +122,6 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
} }
} }
//record prevout, increment the amount of times seen. Ban if over 100
return; return;
} }
} }

View File

@ -2903,7 +2903,10 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
for (unsigned int a = 0; a < tx.vin.size(); a++) { for (unsigned int a = 0; a < tx.vin.size(); a++) {
for (unsigned int b = 0; b < block.vtx.size(); b++) { for (unsigned int b = 0; b < block.vtx.size(); b++) {
//we found the locked tx in the block //we found the locked tx in the block
if(tx.GetHash() == block.vtx[b].GetHash()) continue; if(tx.GetHash() == block.vtx[b].GetHash()) {
printf("CheckBlock -- found locked transaction\n");
continue;
}
for (unsigned int c = 0; c < block.vtx[b].vin.size(); c++) { for (unsigned int c = 0; c < block.vtx[b].vin.size(); c++) {
if(tx.vin[a].prevout == block.vtx[b].vin[c].prevout) { if(tx.vin[a].prevout == block.vtx[b].vin[c].prevout) {