minor changes
This commit is contained in:
parent
d912f3466a
commit
e3ef585263
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -255,7 +254,7 @@ bool ProcessConsensusVote(CConsensusVote& ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// resolve conflicts
|
// resolve conflicts
|
||||||
|
|
||||||
//if this tx lock was rejected, we need to remove the conflicting blocks
|
//if this tx lock was rejected, we need to remove the conflicting blocks
|
||||||
if(mapTxLockReqRejected.count((*i).second.txHash)){
|
if(mapTxLockReqRejected.count((*i).second.txHash)){
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
|
@ -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) {
|
||||||
@ -2916,8 +2919,8 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
|
|||||||
}
|
}
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ----------- masternode payments -----------
|
// ----------- masternode payments -----------
|
||||||
|
|
||||||
bool MasternodePayments = false;
|
bool MasternodePayments = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user