Previously the bool relay
argument to BroadcastTransaction()
designated:
0relay=true: add to the mempool and broadcast to all peers
1relay=false: add to the mempool
Change this to an enum
, so it is more readable and easier to extend with a 3rd option. Consider these example call sites:
0Paint(true);
1// Or
2Paint(/*is_red=*/true);
vs
0Paint(RED);
The idea for putting TxBroadcastMethod
into node/types.h
by Ryan.
This is part of #29415 Broadcast own transactions only via short-lived Tor or I2P connections. Putting it in its own PR to reduce the size of #29415 and because it does not logically depend on the other commits from there.