send requests are const and copied to preserve original

This commit is contained in:
woodser
2019-08-20 09:52:46 -04:00
parent 80c24fab21
commit fd637b4d1c
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -1842,10 +1842,11 @@ namespace monero {
return relay_txs(tx_hexes);
}
monero_tx_set monero_wallet::send(monero_send_request& request) {
monero_tx_set monero_wallet::send(const monero_send_request& request) {
if (request.m_can_split != boost::none && request.m_can_split.get()) throw runtime_error("Cannot request split transactions with send() which prevents splitting; use sendSplit() instead");
request.m_can_split = false;
return send_split(request);
monero_send_request copy = request.copy();
copy.m_can_split = false;
return send_split(copy);
}
monero_tx_set monero_wallet::send(uint32_t account_index, string address, uint64_t amount) {
+1 -1
View File
@@ -855,7 +855,7 @@ namespace monero {
* @param request configures the transaction
* @return a tx set with the requested transaction if possible
*/
monero_tx_set send(monero_send_request& request);
monero_tx_set send(const monero_send_request& request);
/**
* Create and relay a transaction to transfers funds from this wallet to