Better handling of commitment errors
This commit is contained in:
parent
15626201a8
commit
bde2ed0e44
@ -1118,6 +1118,11 @@ export default class Services {
|
||||
|
||||
public async handleCommitError(response: string) {
|
||||
const content = JSON.parse(response);
|
||||
const error = content.error;
|
||||
const errorMsg = error['GenericError'];
|
||||
if (errorMsg === 'State is identical to the previous state') {
|
||||
return;
|
||||
} else if (errorMsg === 'Not enough valid proofs') { return; }
|
||||
// Wait and retry
|
||||
setTimeout(async () => {
|
||||
await this.sendCommitMessage(JSON.stringify(content));
|
||||
|
Loading…
x
Reference in New Issue
Block a user