Allow p2pkh as entropy vin
This commit is contained in:
@@ -1099,16 +1099,21 @@ int64_t DicePlanFunds(uint64_t &entropyval,uint256 &entropytxid,uint64_t refsbit
|
|||||||
//if ( fundingtxid != tx.vin[0].prevout.hash && vinTx.vout[tx.vin[0].prevout.n].scriptPubKey != fundingPubKey )
|
//if ( fundingtxid != tx.vin[0].prevout.hash && vinTx.vout[tx.vin[0].prevout.n].scriptPubKey != fundingPubKey )
|
||||||
if ( fundingtxid != tx.vin[0].prevout.hash && vinTx.vout[1].scriptPubKey != fundingPubKey )
|
if ( fundingtxid != tx.vin[0].prevout.hash && vinTx.vout[1].scriptPubKey != fundingPubKey )
|
||||||
{
|
{
|
||||||
uint8_t *ptr0,*ptr1; int32_t i; char str[65];
|
uint8_t *ptr0,*ptr1; int32_t i; char str[65],addr0[64],addr1[64];
|
||||||
ptr0 = (uint8_t *)vinTx.vout[1].scriptPubKey.data();
|
Getscriptaddress(addr0,vinTx.vout[1].scriptPubKey);
|
||||||
ptr1 = (uint8_t *)fundingPubKey.data();
|
Getscriptaddress(addr1,fundingPubKey);
|
||||||
for (i=0; i<vinTx.vout[1].scriptPubKey.size(); i++)
|
if ( strcmp(addr0,addr1) != 0 )
|
||||||
fprintf(stderr,"%02x",ptr0[i]);
|
{
|
||||||
fprintf(stderr," script vs ");
|
ptr0 = (uint8_t *)vinTx.vout[1].scriptPubKey.data();
|
||||||
for (i=0; i<fundingPubKey.size(); i++)
|
ptr1 = (uint8_t *)fundingPubKey.data();
|
||||||
fprintf(stderr,"%02x",ptr1[i]);
|
for (i=0; i<vinTx.vout[1].scriptPubKey.size(); i++)
|
||||||
fprintf(stderr," (%c) entropy vin.%d fundingPubKey mismatch %s\n",funcid,1,uint256_str(str,tx.vin[0].prevout.hash));
|
fprintf(stderr,"%02x",ptr0[i]);
|
||||||
continue;
|
fprintf(stderr," script vs ");
|
||||||
|
for (i=0; i<fundingPubKey.size(); i++)
|
||||||
|
fprintf(stderr,"%02x",ptr1[i]);
|
||||||
|
fprintf(stderr," (%c) entropy vin.%d fundingPubKey mismatch %s %s vs %s\n",funcid,1,uint256_str(str,tx.vin[0].prevout.hash),addr0,addr1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( myIsutxo_spentinmempool(txid,vout) == 0 )
|
if ( myIsutxo_spentinmempool(txid,vout) == 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user