lnrpc: add new VerifyChanBackup command

This commit is contained in:
Olaoluwa Osuntokun 2019-03-10 17:53:53 -07:00
parent 26f6fd7db2
commit 7ab8096d4a
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2
3 changed files with 524 additions and 404 deletions

File diff suppressed because it is too large Load Diff

View File

@ -726,6 +726,15 @@ service Lightning {
rpc ExportAllChannelBackups(ChanBackupExportRequest) returns (ChanBackupSnapshot) {
};
/**
VerifyChanBackup allows a caller to verify the integrity of a channel
backup snapshot. This method will accept both a packed Single, and also a
Packed multi. Two bools are returned which indicate if the passed Single
(if present) is valid and also if the passed Multi (if present) is valid.
*/
rpc VerifyChanBackup(ChanBackupSnapshot) returns (VerifyChanBackupResponse) {
};
/** lncli: `restorechanbackup`
RestoreChannelBackups accepts a set of singular channel backups, or a
single encrypted multi-chan backup and attempts to recover any funds
@ -2320,3 +2329,8 @@ message RestoreChanBackupRequest {
message RestoreBackupResponse {}
message ChannelBackupSubscription {}
message VerifyChanBackupResponse {
bool singles_valid = 1 [ json_name = "singles_valid"];
bool multi_valid = 2 [ json_name = "multi_valid"];
}

View File

@ -3232,6 +3232,19 @@
}
}
},
"lnrpcVerifyChanBackupResponse": {
"type": "object",
"properties": {
"singles_valid": {
"type": "boolean",
"format": "boolean"
},
"multi_valid": {
"type": "boolean",
"format": "boolean"
}
}
},
"lnrpcVerifyMessageRequest": {
"type": "object",
"properties": {