mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
Mint: invalidate and generate promises in single db transaction for split (#374)
* test for spending output again * first gernerate (which can fail) then invalidate (db and memory) * use external get_db_connection function to be compatible with existing Database class in LNbits
This commit is contained in:
@@ -258,9 +258,7 @@ async def split(
|
||||
logger.trace(f"> POST /split: {payload}")
|
||||
assert payload.outputs, Exception("no outputs provided.")
|
||||
|
||||
promises = await ledger.split(
|
||||
proofs=payload.proofs, outputs=payload.outputs, amount=payload.amount
|
||||
)
|
||||
promises = await ledger.split(proofs=payload.proofs, outputs=payload.outputs)
|
||||
|
||||
if payload.amount:
|
||||
# BEGIN backwards compatibility < 0.13
|
||||
|
||||
Reference in New Issue
Block a user