Skip to content

Commit

Permalink
Merge pull request #232 from KomodoPlatform/beta
Browse files Browse the repository at this point in the history
sync master
  • Loading branch information
ca333 authored Nov 28, 2019
2 parents 772054f + b4ff0e0 commit cbb84d3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/komodo_gateway.h
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,29 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
{
if ( i == 0 && txn_count > 1 && block.vtx[txn_count-1].vout.size() > 0 && block.vtx[txn_count-1].vout[0].nValue == 5000 )
{
/*
if ( block.vtx[txn_count-1].vin.size() == 1 && GetTransaction(block.vtx[txn_count-1].vin[0].prevout.hash,tx,hash,false) && block.vtx[0].vout[0].scriptPubKey == tx.vout[block.vtx[txn_count-1].vin[0].prevout.n].scriptPubKey )
notmatched = 1;
*/
if ( block.vtx[txn_count-1].vin.size() == 1 ) {
uint256 hashNotaryProofVin = block.vtx[txn_count-1].vin[0].prevout.hash;
int fNotaryProofVinTxFound = GetTransaction(hashNotaryProofVin,tx,hash,false);
if (!fNotaryProofVinTxFound) {
// try to search in the same block
BOOST_FOREACH(const CTransaction &txInThisBlock, block.vtx) {
if (txInThisBlock.GetHash() == hashNotaryProofVin) {
fNotaryProofVinTxFound = 1;
tx = txInThisBlock;
hash = block.GetHash();
break;
}
}
}
if ( fNotaryProofVinTxFound && block.vtx[0].vout[0].scriptPubKey == tx.vout[block.vtx[txn_count-1].vin[0].prevout.n].scriptPubKey )
{
notmatched = 1;
}
}
}
n = block.vtx[i].vin.size();
for (j=0; j<n; j++)
Expand Down

0 comments on commit cbb84d3

Please sign in to comment.