Skip to content

Commit eb9730a

Browse files
committed
Merge bitcoin/bitcoin#31987: wallet: Replace "non-0" with "non-zero" in translatable error message
18e8353 wallet: Replace "non-0" with "non-zero" in translatable error message (Hennadii Stepanov) Pull request description: Transifex interprets the "-0" substring as a number in translatable strings. Since not all translations preserve "-0," this triggers a corresponding warning. While this warning could be disabled globally, it is more reasonable to adjust the original string instead. ACKs for top commit: davidgumberg: ACK bitcoin/bitcoin@18e8353 l0rinc: ACK 18e8353 1440000bytes: ACK bitcoin/bitcoin@18e8353 BrandonOdiwuor: Code Review ACK 18e8353 laanwj: Code review ACK 18e8353 Tree-SHA512: 5c38cfc4b352dbbcc8de5fb907cf988a77a7ecded7a90fe0517bfb9e4cd5097bdeb1aa6edf5d9ca37de54d1d7939d5e49533ec93c403db90d9169ad7732e5124
2 parents f347d79 + 18e8353 commit eb9730a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wallet/spend.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
11381138
// This can only happen if feerate is 0, and requested destinations are value of 0 (e.g. OP_RETURN)
11391139
// and no pre-selected inputs. This will result in 0-input transaction, which is consensus-invalid anyways
11401140
if (selection_target == 0 && !coin_control.HasSelected()) {
1141-
return util::Error{_("Transaction requires one destination of non-0 value, a non-0 feerate, or a pre-selected input")};
1141+
return util::Error{_("Transaction requires one destination of non-zero value, a non-zero feerate, or a pre-selected input")};
11421142
}
11431143

11441144
// Fetch manually selected coins

test/functional/rpc_psbt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ def test_psbt_input_keys(psbt_input, keys):
999999
{'hex': '0200000001dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd0000000000000000000100000000000000000000000000', 'complete': True})
10001000

10011001
self.log.info("Test we don't crash when making a 0-value funded transaction at 0 fee without forcing an input selection")
1002-
assert_raises_rpc_error(-4, "Transaction requires one destination of non-0 value, a non-0 feerate, or a pre-selected input", self.nodes[0].walletcreatefundedpsbt, [], [{"data": "deadbeef"}], 0, {"fee_rate": "0"})
1002+
assert_raises_rpc_error(-4, "Transaction requires one destination of non-zero value, a non-zero feerate, or a pre-selected input", self.nodes[0].walletcreatefundedpsbt, [], [{"data": "deadbeef"}], 0, {"fee_rate": "0"})
10031003

10041004
self.log.info("Test descriptorprocesspsbt updates and signs a psbt with descriptors")
10051005

0 commit comments

Comments
 (0)