mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-05 23:24:21 +01:00
coin moves: record their attempted cheat (and our handling thereof)
For cheats, we do a little bit of weird accounting. First we 'update' our on-ledger balance to be the entirety of the channel's balance. Then, as outputs get resolved, we record the fees and outputs as withdrawals from this amount. It's possible that they might successfully 'cheat', in which case we record those as 'penalty' but debits (not credits).
This commit is contained in:
committed by
Rusty Russell
parent
007a62a369
commit
6ee6cdc280
@@ -35,6 +35,9 @@ enum tx_type {
|
||||
/* When we spend a delayed output (after cltv_expiry) */
|
||||
OUR_DELAYED_RETURN_TO_WALLET,
|
||||
|
||||
/* When they spend a delayed output we were attempting to steal */
|
||||
THEIR_DELAYED_CHEAT,
|
||||
|
||||
/* When we use revocation key to take output. */
|
||||
OUR_PENALTY_TX,
|
||||
|
||||
@@ -57,6 +60,9 @@ enum output_type {
|
||||
OUTPUT_TO_US,
|
||||
DELAYED_OUTPUT_TO_THEM,
|
||||
|
||||
/* THEIR_REVOKED_UNILATERAL (they shouldn't be able to claim these) */
|
||||
DELAYED_CHEAT_OUTPUT_TO_THEM,
|
||||
|
||||
/* OUR_UNILATERAL, or OUR_HTLC_TIMEOUT_TX */
|
||||
DELAYED_OUTPUT_TO_US,
|
||||
OUTPUT_TO_THEM,
|
||||
|
||||
Reference in New Issue
Block a user