MCPcopy Create free account
hub / github.com/ElementsProject/lightning / commit_peer_backup

Function commit_peer_backup

plugins/chanbackup.c:674–686  ·  view source on GitHub ↗

Write to the datastore */

Source from the content-addressed store, hash-verified

672
673/* Write to the datastore */
674static struct command_result *commit_peer_backup(struct command *cmd,
675 const struct peer_backup *pb)
676{
677 return jsonrpc_set_datastore_binary(cmd,
678 mkdatastorekey(tmpctx,
679 "chanbackup",
680 "peers",
681 take(fmt_node_id(NULL,
682 &pb->peer))),
683 pb->data, tal_bytelen(pb->data),
684 "create-or-replace",
685 NULL, NULL, NULL);
686}
687
688static struct command_result *json_state_changed(struct command *cmd,
689 const char *buf,

Callers 2

json_state_changedFunction · 0.85
handle_your_peer_storageFunction · 0.85

Calls 2

fmt_node_idFunction · 0.85
tal_bytelenFunction · 0.85

Tested by

no test coverage detected