rpcwallet: Add TransactionBuilder argument to AsyncRPCOperation_sendmany

This commit is contained in:
Jack Grigg
2018-08-04 12:23:13 +01:00
parent 81e0fd2eb9
commit 36e2141d92
5 changed files with 45 additions and 18 deletions

View File

@@ -53,6 +53,7 @@ int find_output(UniValue obj, int n) {
}
AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
boost::optional<TransactionBuilder> builder,
CMutableTransaction contextualTx,
std::string fromAddress,
std::vector<SendManyRecipient> tOutputs,
@@ -75,7 +76,13 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
if (tOutputs.size() == 0 && zOutputs.size() == 0) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "No recipients");
}
isUsingBuilder_ = false;
if (builder) {
isUsingBuilder_ = true;
builder_ = builder.get();
}
fromtaddr_ = DecodeDestination(fromAddress);
isfromtaddr_ = IsValidDestination(fromtaddr_);
isfromzaddr_ = false;