wallet: makeOpen will remove added output if output is doubleOpen.

This commit is contained in:
Nodari Chkuaselidze 2025-08-20 15:29:15 +04:00
parent 8f42b5ddd7
commit 2ae6584a0b
No known key found for this signature in database
GPG key ID: B018A7BB437D1F05

View file

@ -1770,8 +1770,10 @@ class Wallet extends EventEmitter {
mtx.outputs.push(output);
if (await this.txdb.isDoubleOpen(mtx))
if (await this.txdb.isDoubleOpen(mtx)) {
mtx.outputs.pop();
throw new Error(`Already sent an open for: ${name}.`);
}
return mtx;
}