From 5187ec0b690e3d1db23a76bd1a1a24d3bd65468b Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 1 Oct 2021 10:54:20 +0200 Subject: [PATCH 1/2] Merge bitcoin/bitcoin#23136: test: update fee rate assertion helper in the functional test framework b658d7d5c5339739dc19bf961d84186469a818d5 test: update assert_fee_amount() in test_framework/util.py (Jon Atack) Pull request description: Follow-up to 42e1b5d9797b65 (#12486). - update call to `round()` with our utility function `satoshi_round()` to avoid intermittent test failures - rename `fee_per_kB` to `feerate_BTC_kvB` for precision - store division result in `feerate_BTC_vB` Possibly resolves #19418. ACKs for top commit: meshcollider: utACK b658d7d5c5339739dc19bf961d84186469a818d5 Tree-SHA512: f124ded98c913f98782dc047a85a05d3fdf5f0585041fa81129be562138f6261ec1bd9ee2af89729028277e75b591b0a7ad50244016c2b2fa935c6e400523183 --- test/functional/test_framework/util.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 59a4d663cc2f3..1d730feb8cc39 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -36,13 +36,14 @@ def assert_approx(v, vexp, vspan=0.00001): raise AssertionError("%s > [%s..%s]" % (str(v), str(vexp - vspan), str(vexp + vspan))) -def assert_fee_amount(fee, tx_size, fee_per_kB): - """Assert the fee was in range""" - target_fee = round(tx_size * fee_per_kB / 1000, 8) +def assert_fee_amount(fee, tx_size, feerate_DASH_kvB): + """Assert the fee is in range.""" + feerate_DASH_vB = feerate_DASH_kvB / 1000 + target_fee = satoshi_round(tx_size * feerate_DASH_vB) if fee < target_fee: raise AssertionError("Fee of %s DASH too low! (Should be %s DASH)" % (str(fee), str(target_fee))) # allow the wallet's estimation to be at most 2 bytes off - if fee > (tx_size + 2) * fee_per_kB / 1000: + if fee > (tx_size + 2) * feerate_DASH_vB: raise AssertionError("Fee of %s DASH too high! (Should be %s DASH)" % (str(fee), str(target_fee))) From 379aefab10f487676daec41d3871583b408bb166 Mon Sep 17 00:00:00 2001 From: laanwj <126646+laanwj@users.noreply.github.com> Date: Thu, 24 Feb 2022 12:34:33 +0100 Subject: [PATCH 2/2] Merge bitcoin/bitcoin#24434: Add missed word to error message ff33c5ae633191df94759a5f3deead43863cd8fd Add missed word to error message (Hennadii Stepanov) Pull request description: Reported by Transifex translator [mmazi](https://www.transifex.com/user/profile/mmazi/). ACKs for top commit: laanwj: ACK ff33c5ae633191df94759a5f3deead43863cd8fd Tree-SHA512: 487512956dbaa42a33057362fc438f45ded211493221646b23101784902e75e6d72ef5b5184f175362e0d821a8409badc58abab4e06e86d4934b064dc5bb7050 --- src/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 3b54c7422cd13..8d2f8746c1052 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -4353,7 +4353,7 @@ bool CConnman::Start(CDeterministicMNManager& dmnman, CMasternodeMetaMan& mn_met if (connOptions.m_use_addrman_outgoing && !connOptions.m_specified_outgoing.empty()) { if (clientInterface) { clientInterface->ThreadSafeMessageBox( - _("Cannot provide specific connections and have addrman find outgoing connections at the same."), + _("Cannot provide specific connections and have addrman find outgoing connections at the same time."), "", CClientUIInterface::MSG_ERROR); } return false;