Multi Node Cnxn Mgr
A connection manager that handles connections to multiple nodes
Properties
Tell peers to only be interested in things that match this bloom
Don't reconnect to these nodes
a block has arrived. This could be a BCHBlock or a MerkleBlock
If the connection state changes, this function will be called
What index in the sorted list of prospects are we on
Maintain this many connections to the bitcoin network
Active seeders
Get the current list of electrum protocol connections It is better to use the connection getter functions, rather than accessing this list. This is meant for display, health and statistics, rather than access
supply electrum server ip and ports if we need them
a block header has arrived
This connection is coming up
a notification of an object's existence has arrived
If a seeder was supplied, store its domain name here
A partially complete MerkleBlock arrived
if this is not null, try all communications to this connection first
once we get into 0 priority prospects, if the length of prospects is this number then loop back to 0. This stops us from trying more than a few unlikely connections (provided by ADDR messages)
schedule connection retries: we'll take 5 per retry, so this results in a try every 5 seconds on average, but you can build up 100 quick retries. The effect of this is to try lots of connections, but if there's an outage or something it falls back to a slower non-spammy retry.
Add a callback to handle incoming transactions
If fully connected, close a connection whose average latency is this (in milliseconds) to free up space for something faster
If a message of a certain type comes in, call this callback with the message for processing
Functions
Return a list of connections that are active (either connected or being initialized)
Add a callback to handle incoming blocks -- downcast the parameter to either BCHBlock or MerkleBlock
Add a callback to handle incoming block headers
Add a callback to handle incoming inventory (right now, only blocks, the CnxnMgr auto-handles tx INVs)
Add a callback to handle incoming incomplete MerkleBlocks
Add a callback to handle incoming transactions
Go through the connection list, removing any dead connections (called automatically)
remove a node (or all nodes if ip==null) from the ban table
Returns true if we are connected to this node/port
disconnect from the lowest N performing peers
Configure exclusive nodes. Use null to remove them. If some exclusive nodes are defined, the connection manager will only connect to them.
Returns a random connection from the connection manager's node set, but not one of these. Returns null if no connections left. You must return any received connection back (when finished with it via returnElecturm
Returns a random connection from the connection manager's node set, but not one of these. Returns null if no connections left
Returns a random connection from the connection manager's node set. Tries 10 candidates then throws @ref ElectrumNoNodesException You must return the connection back to the connection manager via returnElectrum
Loops looking for an alive connection, returns null if no connections are left
Return a list of connections that are being initialized
report a node as having a problem
Configure preferred nodes. Use null to remove an existing one. The connection manager always tries to connect to and use preferred nodes, but will also connect to other nodes.
After calling getElectrum, give it back to the connection manager for reuse or to be cleaned up
Send a transaction to one node
Broadcast a set of transactions to the network, returns true if transactions were sent (otherwise no nodes are available).
tell all nodes, including future connections, that we are only interested in things that match this bloom filter. To enable multiple wallets to use the same Blockchain, do NOT use this API directly. Instead use the blockchain API