Write to the datastore */
| 672 | |
| 673 | /* Write to the datastore */ |
| 674 | static 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 | |
| 688 | static struct command_result *json_state_changed(struct command *cmd, |
| 689 | const char *buf, |
no test coverage detected