Skip to content

Commit fdc9fc1

Browse files
committed
test: check getprivatebroadcast and abortprivatebroadcast throw if the node is running without -privatebroadcast set
1 parent 7b821ef commit fdc9fc1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎test/functional/p2p_private_broadcast.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ def run_test(self):
223223
tx_receiver = self.nodes[1]
224224
far_observer = tx_receiver.add_p2p_connection(P2PInterface())
225225

226+
self.log.info("Test getprivatebroadcastinfo and abortprivatebroadcast fails if the node is running without -privatebroadcast set")
227+
assert_raises_rpc_error(-32601, "Private broadcast is not enabled. Ensure you're running Bitcoin Core with -privatebroadcast=1.",
228+
tx_receiver.getprivatebroadcastinfo)
229+
assert_raises_rpc_error(-32601, "Private broadcast is not enabled. Ensure you're running Bitcoin Core with -privatebroadcast=1.",
230+
tx_receiver.abortprivatebroadcast, "00" * 32)
231+
226232
self.fill_node_addrman(node_index=0, address_types_to_add=[CAddress.NET_IPV4, CAddress.NET_IPV6, CAddress.NET_TORV3, CAddress.NET_I2P, CAddress.NET_CJDNS])
227233

228234
wallet = MiniWallet(tx_originator)

0 commit comments

Comments
 (0)