Skip to content

Commit 3092cfc

Browse files
random-zebrafurszy
authored andcommitted
add empty output to createrawzerocoinstake
1 parent c5a6a67 commit 3092cfc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,12 +957,12 @@ UniValue createrawzerocoinstake(const UniValue& params, bool fHelp)
957957

958958
// create the zerocoinmint output (one spent denom + three 1-zPIV denom)
959959
libzerocoin::CoinDenomination staked_denom = input_mint.GetDenomination();
960-
std::vector<CTxOut> vOutMint(4);
960+
std::vector<CTxOut> vOutMint(5);
961961
CDeterministicMint dMint;
962-
if (!pwalletMain->CreateZPIVOutPut(staked_denom, vOutMint[0], dMint))
962+
if (!pwalletMain->CreateZPIVOutPut(staked_denom, vOutMint[1], dMint))
963963
throw JSONRPCError(RPC_WALLET_ERROR, "failed to create new zpiv output");
964964

965-
for (int i=1; i<4; i++) {
965+
for (int i=2; i<5; i++) {
966966
if (!pwalletMain->CreateZPIVOutPut(libzerocoin::ZQ_ONE, vOutMint[i], dMint))
967967
throw JSONRPCError(RPC_WALLET_ERROR, "failed to create new zpiv output");
968968
}

0 commit comments

Comments
 (0)