mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-18 19:41:21 +02:00
contractcourt: add PutResolverReport function to chanArb config
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb"
|
||||
"github.com/lightningnetwork/lnd/clock"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
@@ -347,6 +348,14 @@ func newActiveChannelArbitrator(channel *channeldb.OpenChannel,
|
||||
IsPendingClose: false,
|
||||
ChainArbitratorConfig: c.cfg,
|
||||
ChainEvents: chanEvents,
|
||||
PutResolverReport: func(tx kvdb.RwTx,
|
||||
report *channeldb.ResolverReport) error {
|
||||
|
||||
return c.chanSource.PutResolverReport(
|
||||
tx, c.cfg.ChainHash, &channel.FundingOutpoint,
|
||||
report,
|
||||
)
|
||||
},
|
||||
}
|
||||
|
||||
// The final component needed is an arbitrator log that the arbitrator
|
||||
@@ -552,6 +561,13 @@ func (c *ChainArbitrator) Start() error {
|
||||
IsPendingClose: true,
|
||||
ClosingHeight: closeChanInfo.CloseHeight,
|
||||
CloseType: closeChanInfo.CloseType,
|
||||
PutResolverReport: func(tx kvdb.RwTx,
|
||||
report *channeldb.ResolverReport) error {
|
||||
|
||||
return c.chanSource.PutResolverReport(
|
||||
tx, c.cfg.ChainHash, &chanPoint, report,
|
||||
)
|
||||
},
|
||||
}
|
||||
chanLog, err := newBoltArbitratorLog(
|
||||
c.chanSource.Backend, arbCfg, c.cfg.ChainHash, chanPoint,
|
||||
|
Reference in New Issue
Block a user