aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-04-03 17:55:24 -0400
committerJohn Newbery <john@johnnewbery.com>2019-10-18 09:26:32 -0400
commitd1734f9a3b138ab046f38ee44a09bc3847bf938a (patch)
tree172eb76ab4c70e926fe292d8e535cae48ee879fc /src/qt/walletmodel.cpp
parentb6f486a02b463ffeaf82ec11fc6f74f439c037ae (diff)
downloadbitcoin-d1734f9a3b138ab046f38ee44a09bc3847bf938a.tar.xz
[wallet] Remove return value from CommitTransaction()
CommitTransaction returns a bool to indicate success, but since commit b3a74100b8 it only returns true, even if the transaction was not successfully broadcast. This commit changes CommitTransaction() to return void. All dead code in `if (!CommitTransaction())` branches has been removed.
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r--src/qt/walletmodel.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 49a13330ec..5bc72125f6 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -260,9 +260,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
}
auto& newTx = transaction.getWtx();
- std::string rejectReason;
- if (!wallet().commitTransaction(newTx, {} /* mapValue */, std::move(vOrderForm), rejectReason))
- return SendCoinsReturn(TransactionCommitFailed, QString::fromStdString(rejectReason));
+ wallet().commitTransaction(newTx, {} /* mapValue */, std::move(vOrderForm));
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
ssTx << *newTx;