Skip to content

Commit

Permalink
merge bitcoin#16493: Fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg authored and pravblockc committed Nov 18, 2021
1 parent 8c16cec commit 161f0a5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
21 changes: 16 additions & 5 deletions test/functional/feature_dbcrash.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,27 @@
import random
import time

from test_framework.messages import COIN, COutPoint, CTransaction, CTxIn, CTxOut, ToHex
from test_framework.messages import (
COIN,
COutPoint,
CTransaction,
CTxIn,
CTxOut,
ToHex,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, create_confirmed_utxos, hex_str_to_bytes
from test_framework.util import (
assert_equal,
create_confirmed_utxos,
hex_str_to_bytes,
)


class ChainstateWriteCrashTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 4
self.setup_clean_chain = False
# Need a bit of extra time for the nodes to start up for this test
self.rpc_timeout = 90
self.rpc_timeout = 180

# Set -maxmempool=0 to turn off mempool memory sharing with dbcache
# Set -rpcservertimeout=900 to reduce socket disconnects in this
Expand All @@ -54,7 +64,8 @@ def set_test_params(self):
self.node2_args = ["-dbcrashratio=24", "-dbcache=16"] + self.base_args

# Node3 is a normal node with default args, will mine full blocks
self.node3_args = []
# and non-standard txs (e.g. txs with "dust" outputs)
self.node3_args = ["-acceptnonstdtxn"]
self.extra_args = [self.node0_args, self.node1_args, self.node2_args, self.node3_args]

def skip_test_if_missing_module(self):
Expand Down
11 changes: 8 additions & 3 deletions test/functional/feature_fee_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,16 @@ def check_estimates(node, fees_seen):
else:
assert_greater_than_or_equal(i + 1, e["blocks"])


class EstimateFeeTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 3
# mine non-standard txs (e.g. txs with "dust" outputs)
self.extra_args = [
["-maxorphantxsize=1000", "-whitelist=127.0.0.1"],
["-blockmaxsize=17000", "-maxorphantxsize=1000", "-whitelist=127.0.0.1"],
["-blockmaxsize=8000", "-maxorphantxsize=1000", "-whitelist=127.0.0.1"]
]

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
Expand All @@ -133,9 +140,7 @@ def setup_network(self):
But first we need to use one node to create a lot of outputs
which we will use to generate our transactions.
"""
self.add_nodes(3, extra_args=[["-maxorphantxsize=1000", "-whitelist=127.0.0.1"],
["-blockmaxsize=17000", "-maxorphantxsize=1000", "-whitelist=127.0.0.1"],
["-blockmaxsize=8000", "-maxorphantxsize=1000", "-whitelist=127.0.0.1"]])
self.add_nodes(3, extra_args=self.extra_args)
# Use node0 to mine blocks for input splitting
# Node1 mines small blocks but that are bigger than the expected transaction rate.
# NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes,
Expand Down

0 comments on commit 161f0a5

Please sign in to comment.