From fea97699ec24e51d2df753db3e28c1e2ac800c80 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 15 Mar 2022 15:23:44 +0800 Subject: [PATCH] contractcourt: remove unused bucket justice-txn We never writes data to this bucket so it's removed. --- contractcourt/breacharbiter.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/contractcourt/breacharbiter.go b/contractcourt/breacharbiter.go index 4ff90be81..1735d0cec 100644 --- a/contractcourt/breacharbiter.go +++ b/contractcourt/breacharbiter.go @@ -47,11 +47,6 @@ var ( // procedure, we can recover and continue from the persisted state. retributionBucket = []byte("retribution") - // justiceTxnBucket holds the finalized justice transactions for all - // breached contracts. Entries are added to the justice txn bucket just - // before broadcasting the sweep txn. - justiceTxnBucket = []byte("justice-txn") - // errBrarShuttingDown is an error returned if the breacharbiter has // been signalled to exit. errBrarShuttingDown = errors.New("breacharbiter shutting down") @@ -1578,18 +1573,7 @@ func (rs *RetributionStore) Remove(chanPoint *wire.OutPoint) error { // Remove the persisted retribution info and finalized justice // transaction. - if err := retBucket.Delete(chanBytes); err != nil { - return err - } - - // If we have not finalized this channel breach, we can exit - // early. - justiceBkt := tx.ReadWriteBucket(justiceTxnBucket) - if justiceBkt == nil { - return nil - } - - return justiceBkt.Delete(chanBytes) + return retBucket.Delete(chanBytes) }, func() {}) }