mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
gossipd: invalidate old gossip_stores.
Incrementing version number means stores which were prior to the previous commit will be removed, and refreshed. The simplest fix, if not the most efficient. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
0855422110
commit
48de77d56e
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
|||
/**
|
||||
* gossip_store -- On-disk storage related information
|
||||
*/
|
||||
#define GOSSIP_STORE_VERSION 2
|
||||
#define GOSSIP_STORE_VERSION 3
|
||||
|
||||
struct gossip_store;
|
||||
struct routing_state;
|
||||
|
|
|
@ -822,7 +822,7 @@ def test_gossip_store_load(node_factory):
|
|||
"""Make sure we can read canned gossip store"""
|
||||
l1 = node_factory.get_node(start=False)
|
||||
with open(os.path.join(l1.daemon.lightning_dir, 'gossip_store'), 'wb') as f:
|
||||
f.write(bytearray.fromhex("02" # GOSSIP_VERSION
|
||||
f.write(bytearray.fromhex("03" # GOSSIP_VERSION
|
||||
"00000099" # len
|
||||
"12abbbba" # csum
|
||||
"1002" # WIRE_GOSSIP_STORE_NODE_ANNOUNCEMENT
|
||||
|
|
Loading…
Add table
Reference in a new issue