pub enum NodeResponse {
Config(UtreexoNodeConfig),
Block(Option<Block>),
UtreexoProof(Option<Proof>),
MempoolTransaction(Option<Transaction>),
GetPeerInfo(Vec<PeerInfo>),
GetConnectionCount(usize),
Add(bool),
Remove(bool),
Disconnect(bool),
Onetry(bool),
Ping(bool),
TransactionBroadcastResult(Result<Txid, AcceptToMempoolError>),
}Expand description
A response that can be sent back to the user.
When the user makes a request to the node, the node will respond with some data. This enum represents all the possible responses that the node can send back to the user.
Variants§
Config(UtreexoNodeConfig)
The UtreexoNodeConfig of the node.
Block(Option<Block>)
A response containing a block, if we could fetch it.
UtreexoProof(Option<Proof>)
A response containing a Utreexo proof, if we could fetch it.
MempoolTransaction(Option<Transaction>)
A response containing a transaction from the mempool, if we could fetch it.
GetPeerInfo(Vec<PeerInfo>)
A response containing a list of peer information.
GetConnectionCount(usize)
The number of connected peers
Add(bool)
A response indicating whether a peer was successfully added.
Remove(bool)
A response indicating whether a peer was successfully removed.
Disconnect(bool)
Onetry(bool)
A response indicating whether a peer was successfully connected once.
Ping(bool)
A response indicating whether the ping was successful.
TransactionBroadcastResult(Result<Txid, AcceptToMempoolError>)
Transaction broadcast