Optional OP_RETURN in z_sendmany
This commit is contained in:
@@ -65,8 +65,9 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
|
||||
std::vector<SendManyRecipient> zOutputs,
|
||||
int minDepth,
|
||||
CAmount fee,
|
||||
UniValue contextInfo) :
|
||||
tx_(contextualTx), fromaddress_(fromAddress), t_outputs_(tOutputs), z_outputs_(zOutputs), mindepth_(minDepth), fee_(fee), contextinfo_(contextInfo)
|
||||
UniValue contextInfo,
|
||||
CScript opret) :
|
||||
tx_(contextualTx), fromaddress_(fromAddress), t_outputs_(tOutputs), z_outputs_(zOutputs), mindepth_(minDepth), fee_(fee), contextinfo_(contextInfo), opret_(opret)
|
||||
{
|
||||
assert(fee_ >= 0);
|
||||
|
||||
@@ -469,6 +470,10 @@ bool AsyncRPCOperation_sendmany::main_impl() {
|
||||
}
|
||||
}
|
||||
|
||||
// Add optional OP_RETURN if it exists
|
||||
if ( opret_ != CScript() ) {
|
||||
builder_.AddOpRet(opret_);
|
||||
}
|
||||
// Build the transaction
|
||||
auto maybe_tx = builder_.Build();
|
||||
if (!maybe_tx) {
|
||||
|
||||
Reference in New Issue
Block a user