datastore: fix emptying of store into upgraded node.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-08-19 13:33:48 +09:30
committed by Christian Decker
parent eac6b087da
commit d7bfc2204d

View File

@@ -17,7 +17,7 @@ def unload_store(plugin):
plugin.log("Emptying store into main store (resetting generations!)", level='unusual')
for k, (g, data) in datastore.items():
try:
plugin.rpc.datastore(key=[k], hex=d.hex())
plugin.rpc.datastore(key=[k], hex=data.hex())
except RpcError as e:
plugin.log("Failed to put {} into store: {}".format(k, e),
level='broken')