This commit is contained in:
jl777
2019-05-14 23:58:37 -11:00
parent 8d506a51a6
commit 598cb471ad

View File

@@ -72,7 +72,7 @@ const std::string ADDR_TYPE_SAPLING = "sapling";
extern UniValue TxJoinSplitToJSON(const CTransaction& tx);
uint32_t komodo_segid32(char *coinaddr);
int32_t komodo_dpowconfs(int32_t height,int32_t numconfs);
int32_t komodo_isnotaryvout(char *coinaddr); // from ac_private chains only
int32_t komodo_isnotaryvout(char *coinaddr,uint32_t tiptime); // from ac_private chains only
CBlockIndex *komodo_getblockindex(uint256 hash);
int64_t nWalletUnlockTime;
@@ -461,7 +461,6 @@ static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtr
throw JSONRPCError(RPC_WALLET_ERROR, "Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
}
int32_t komodo_isnotaryvout(char *coinaddr);
UniValue sendtoaddress(const UniValue& params, bool fHelp)
{
@@ -494,7 +493,7 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp)
if ( ASSETCHAINS_PRIVATE != 0 && AmountFromValue(params[1]) > 0 )
{
if ( komodo_isnotaryvout((char *)params[0].get_str().c_str()) == 0 )
if ( komodo_isnotaryvout((char *)params[0].get_str().c_str(),chainActive.LastTip()->nTime) == 0 )
{
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid " + strprintf("%s",komodo_chainname()) + " address");
}