0

Test: https://github.com/bitcoin/bitcoin/blob/master/test/functional/mempool_unbroadcast.py

I am trying this manually with below steps:

  1. Run two nodes (regtest):

Node1:

bitcoind -port=18333 -rpcport=18332 -datadir="/home/prayank/node1" -conf="/home/prayank/node1/bitcoin.conf"

Node2:

bitcoind -port=18444 -rpcport=18443 -datadir="/home/prayank/node2" -conf="/home/prayank/node2/bitcoin.conf"
  1. bitcoin.conf:

Node1:

regtest=1
server=1
listen=1

debug=mempool

regtest.rpcport=18332
rpcuser=user3
rpcpassword=password3

fallbackfee=0.0001

regtest.addnode=127.0.0.1:18444

Node2:

regtest=1
server=1
listen=1

debug=mempool

regtest.rpcport=18443
rpcuser=user3
rpcpassword=password3

fallbackfee=0.0001
  1. Everything looks okay until Line 68

How would I do this without running this python code?

        # fast forward into the future & ensure that the second node has the txns
        node.mockscheduler(MAX_INITIAL_BROADCAST_DELAY)
        self.sync_mempools(timeout=30)
2

mockscheduler is a hidden RPC. This means that it will not be displayed when using the help command, but you can still use it by just calling it as usual. E.g. to do the same thing as this line in the test, you would do

bitcoin-cli -regtest mockscheduler 900

sync_mempools() is a function which just waits for the getrawmempool results of multiple nodes to match. You can just do that manually.

1
  • Interesting. This is like hidden gem.
    – Prayank
    Jul 30 at 23:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.