try this arr

This commit is contained in:
blackjok3r
2018-11-03 01:22:18 +08:00
parent 885f304f9c
commit 943026456e
2 changed files with 9 additions and 3 deletions

View File

@@ -269,7 +269,6 @@ void PruneAndFlush();
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree, bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
bool* pfMissingInputs, bool fRejectAbsurdFee=false); bool* pfMissingInputs, bool fRejectAbsurdFee=false);
int32_t pubkey2address(char *destaddr,uint8_t *pubkey33);
struct CNodeStateStats { struct CNodeStateStats {
int nMisbehavior; int nMisbehavior;

View File

@@ -480,7 +480,7 @@ int32_t gettxout_scriptPubKey(uint8_t *scriptPubKey,int32_t maxsize,uint256 txid
uint256 hashBlock; uint256 hashBlock;
if ( GetTransaction(txid,tx,hashBlock,false) == 0 ) if ( GetTransaction(txid,tx,hashBlock,false) == 0 )
return(-1); return(-1);
else if ( n < tx.vout.size() ) else if ( n < tx.vout.size() )
{ {
ptr = (uint8_t *)tx.vout[n].scriptPubKey.data(); ptr = (uint8_t *)tx.vout[n].scriptPubKey.data();
m = tx.vout[n].scriptPubKey.size(); m = tx.vout[n].scriptPubKey.size();
@@ -492,6 +492,13 @@ int32_t gettxout_scriptPubKey(uint8_t *scriptPubKey,int32_t maxsize,uint256 txid
return(-1); return(-1);
} }
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
int32_t pubkey2address(char *destaddr,uint8_t *pubkey33)
{
pubkey2addr((char *)destaddr,(uint8_t *)pubkey33);
}
UniValue gettxoutproof(const UniValue& params, bool fHelp) UniValue gettxoutproof(const UniValue& params, bool fHelp)
{ {
if (fHelp || (params.size() != 1 && params.size() != 2)) if (fHelp || (params.size() != 1 && params.size() != 2))
@@ -1155,7 +1162,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
} }
} else if (fHaveChain) { } else if (fHaveChain) {
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain"); throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
} }
RelayTransaction(tx); RelayTransaction(tx);
return hashTx.GetHex(); return hashTx.GetHex();