diff --git a/test/functional/dbcrash.py b/test/functional/dbcrash.py --- a/test/functional/dbcrash.py +++ b/test/functional/dbcrash.py @@ -62,7 +62,7 @@ self.node2_args = ["-dbcrashratio=24", "-dbcache=16"] + self.base_args # Node3 is a normal node with default args, except will mine full blocks - self.node3_args = ["-blockmaxweight=4000000"] + self.node3_args = ["-blockmaxsize=32000000"] self.extra_args = [self.node0_args, self.node1_args, self.node2_args, self.node3_args] diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -168,7 +168,13 @@ def calculate_fee(self, tx): # Relay fee is in satoshis per KB. Thus the 1000, and the COIN added # to get back to an amount of satoshis. - return int(self.relay_fee() / 1000 * tx.billable_size() * COIN) + billable_size_estimate = tx.billable_size() + # Add some padding for signatures + # NOTE: Fees must be calculated before signatures are added, + # so they will never be included in the billable_size above. + billable_size_estimate += len(tx.vin) * 81 + + return int(self.relay_fee() / 1000 * billable_size_estimate * COIN) def calculate_fee_from_txid(self, txid): ctx = FromHex(CTransaction(), self.getrawtransaction(txid))