Skip to content

Commit

Permalink
[Test] shielded_sendmany: check from_transparent argument in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Nov 14, 2020
1 parent b8e28f8 commit 4b0fd27
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/librust/sapling_rpc_wallet_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,16 @@ BOOST_AUTO_TEST_CASE(rpc_shielded_sendmany_taddr_to_sapling)
->setMinDepth(0)
->buildAndSend(txFinalHash));

// try from auto-selected transparent address
std::string txFinalHash2;
std::vector<SendManyRecipient> recipients2 = { SendManyRecipient(zaddr1, 1 * COIN, "ABCD") };
SaplingOperation operation2(builder);
operation2.testMode = true; // To not commit the transaction
BOOST_CHECK(operation2.setSelectTransparentCoins(true)
->setShieldedRecipients(recipients2)
->setMinDepth(0)
->buildAndSend(txFinalHash));

// Get the transaction
// Test mode does not send the transaction to the network.
auto hexTx = EncodeHexTx(operation.getFinalTx());
Expand Down

0 comments on commit 4b0fd27

Please sign in to comment.