Use CBitcoinAddress wrappers in Zcash-specific code

This commit is contained in:
Jack Grigg
2018-04-20 15:09:23 +01:00
parent 07444da1db
commit b6be3e88bb
12 changed files with 78 additions and 80 deletions

View File

@@ -73,8 +73,8 @@ AsyncRPCOperation_mergetoaddress::AsyncRPCOperation_mergetoaddress(
throw JSONRPCError(RPC_INVALID_PARAMETER, "Recipient parameter missing");
}
toTaddr_ = CBitcoinAddress(std::get<0>(recipient));
isToTaddr_ = toTaddr_.IsValid();
toTaddr_ = DecodeDestination(std::get<0>(recipient));
isToTaddr_ = IsValidDestination(toTaddr_);
isToZaddr_ = false;
if (!isToTaddr_) {
@@ -246,7 +246,7 @@ bool AsyncRPCOperation_mergetoaddress::main_impl()
rawTx.vin.push_back(in);
}
if (isToTaddr_) {
CScript scriptPubKey = GetScriptForDestination(toTaddr_.Get());
CScript scriptPubKey = GetScriptForDestination(toTaddr_);
CTxOut out(sendAmount, scriptPubKey);
rawTx.vout.push_back(out);
}