wallet: makeOpen will remove added output if output is doubleOpen.
This commit is contained in:
parent
8f42b5ddd7
commit
2ae6584a0b
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue