Skip to content

Commit 4d03ef9

Browse files
committed
Use MiniWallet in rpc_net.py
1 parent 4de2382 commit 4d03ef9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/functional/rpc_net.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
assert_raises_rpc_error,
2626
p2p_port,
2727
)
28+
from test_framework.wallet import MiniWallet
2829

2930

3031
def assert_net_servicesnames(servicesflag, servicenames):
@@ -48,6 +49,9 @@ def set_test_params(self):
4849
self.supports_cli = False
4950

5051
def run_test(self):
52+
# We need miniwallet to make a transaction
53+
self.wallet = MiniWallet(self.nodes[0])
54+
self.wallet.generate(1)
5155
# Get out of IBD for the minfeefilter and getpeerinfo tests.
5256
self.nodes[0].generate(101)
5357

@@ -74,8 +78,7 @@ def test_connection_count(self):
7478
def test_getpeerinfo(self):
7579
self.log.info("Test getpeerinfo")
7680
# Create a few getpeerinfo last_block/last_transaction values.
77-
if self.is_wallet_compiled():
78-
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1)
81+
self.wallet.send_self_transfer(from_node=self.nodes[0]) # Make a transaction so we can see it in the getpeerinfo results
7982
self.nodes[1].generate(1)
8083
self.sync_all()
8184
time_now = int(time.time())

0 commit comments

Comments
 (0)