Better handling of commitment errors

This commit is contained in:
NicolasCantu 2025-03-03 23:24:15 +01:00
parent 15626201a8
commit bde2ed0e44

View File

@ -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));