p2p: Announce reconciliation support

If we're connecting to the peer which might support
transaction reconciliation, we announce we want to reconcile
with them.

We store the reconciliation salt so that when the peer
responds with their salt, we are able to compute the
full reconciliation salt.

This behavior is enabled with a CLI flag.
This commit is contained in:
Gleb Naumenko
2022-09-19 17:31:01 +03:00
parent 24e36fac0a
commit 3fcf78ee6a
8 changed files with 173 additions and 2 deletions

View File

@@ -258,6 +258,14 @@ extern const char* CFCHECKPT;
* @since protocol version 70016 as described by BIP 339.
*/
extern const char* WTXIDRELAY;
/**
* Contains 2 1-byte bools, a 4-byte version number and an 8-byte salt.
* The 2 booleans indicate that a node is willing to participate in transaction
* reconciliation, respectively as an initiator or as a receiver.
* The salt is used to compute short txids needed for efficient
* txreconciliation, as described by BIP 330.
*/
extern const char* SENDTXRCNCL;
}; // namespace NetMsgType
/* Get a vector of all valid message types (see above) */