Merge branch 'dwy_mitigation2' into fixgettransactioncrash

This commit is contained in:
blackjok3rtt
2018-11-03 21:13:11 +08:00
committed by GitHub
18 changed files with 246 additions and 61 deletions

View File

@@ -480,7 +480,7 @@ int32_t gettxout_scriptPubKey(uint8_t *scriptPubKey,int32_t maxsize,uint256 txid
uint256 hashBlock;
if ( GetTransaction(txid,tx,hashBlock,false) == 0 )
return(-1);
else if ( n < tx.vout.size() )
else if ( n < tx.vout.size() )
{
ptr = (uint8_t *)tx.vout[n].scriptPubKey.data();
m = tx.vout[n].scriptPubKey.size();
@@ -1185,7 +1185,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
}
} else if (fHaveChain) {
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
}
}
RelayTransaction(tx);
return hashTx.GetHex();