gossip: Use bit 3 (mask 0x08) to signal initial routing sync

After quite some back and forth we seem to finally agree on the bit
3 (mask 0x08) to signal optional initial_routing_sync.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2017-08-08 14:18:30 +02:00
committed by Rusty Russell
parent fbe3a017a9
commit 28cc92cd15
3 changed files with 19 additions and 3 deletions

View File

@@ -970,7 +970,10 @@ static void exchange_init(int fd, struct crypto_state *cs,
* #9](09-features.md), and MUST set to zero any feature bits that are
* not defined.
*/
u8 *msg = towire_init(NULL, NULL, NULL);
u8 *localfeatures = tal_arrz(NULL, u8, 1);
localfeatures[0] = LOCALFEATURES_INITIAL_ROUTING_SYNC;
u8 *msg = towire_init(NULL, NULL, localfeatures);
localfeatures = tal_free(localfeatures);
if (!sync_crypto_write(cs, fd, msg))
status_failed(WIRE_INITMSG_WRITE_FAILED, "%s", strerror(errno));

View File

@@ -17,7 +17,7 @@
#include <unistd.h>
#include <wire/wire_sync.h>
const u8 supported_local_features[] = {0x03};
const u8 supported_local_features[] = {LOCALFEATURES_INITIAL_ROUTING_SYNC};
const u8 supported_global_features[] = {0x00};
/* Before we have identified the peer, we just have a connection object. */