contractcourt: init BudgetConfig in unit tests

This commit is contained in:
yyforyongyu 2024-03-19 05:04:49 +08:00
parent 0a611aae00
commit aa44197f88
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868
7 changed files with 10 additions and 2 deletions

View File

@ -86,7 +86,8 @@ func TestChainArbitratorRepublishCloses(t *testing.T) {
published[tx.TxHash()]++
return nil
},
Clock: clock.NewDefaultClock(),
Clock: clock.NewDefaultClock(),
Budget: *DefaultBudgetConfig(),
}
chainArb := NewChainArbitrator(
chainArbCfg, db,
@ -169,7 +170,8 @@ func TestResolveContract(t *testing.T) {
PublishTx: func(tx *wire.MsgTx, _ string) error {
return nil
},
Clock: clock.NewDefaultClock(),
Clock: clock.NewDefaultClock(),
Budget: *DefaultBudgetConfig(),
}
chainArb := NewChainArbitrator(
chainArbCfg, db,

View File

@ -390,6 +390,7 @@ func createTestChannelArbitrator(t *testing.T, log ArbitratorLog,
return nil
},
Budget: *DefaultBudgetConfig(),
}
// We'll use the resolvedChan to synchronize on call to

View File

@ -42,6 +42,7 @@ func newCommitSweepResolverTestContext(t *testing.T,
ChainArbitratorConfig: ChainArbitratorConfig{
Notifier: notifier,
Sweeper: sweeper,
Budget: *DefaultBudgetConfig(),
},
PutResolverReport: func(_ kvdb.RwTx,
_ *channeldb.ResolverReport) error {

View File

@ -351,6 +351,7 @@ func newIncomingResolverTestContext(t *testing.T, isExit bool) *incomingResolver
return nil
},
HtlcNotifier: htlcNotifier,
Budget: *DefaultBudgetConfig(),
},
PutResolverReport: func(_ kvdb.RwTx,
_ *channeldb.ResolverReport) error {

View File

@ -152,6 +152,7 @@ func newOutgoingResolverTestContext(t *testing.T) *outgoingResolverTestContext {
return nil
},
OnionProcessor: onionProcessor,
Budget: *DefaultBudgetConfig(),
},
PutResolverReport: func(_ kvdb.RwTx,
_ *channeldb.ResolverReport) error {

View File

@ -88,6 +88,7 @@ func newHtlcResolverTestContext(t *testing.T,
return nil
},
HtlcNotifier: htlcNotifier,
Budget: *DefaultBudgetConfig(),
},
PutResolverReport: func(_ kvdb.RwTx,
report *channeldb.ResolverReport) error {

View File

@ -301,6 +301,7 @@ func TestHtlcTimeoutResolver(t *testing.T) {
resolutionChan <- msgs[0]
return nil
},
Budget: *DefaultBudgetConfig(),
},
PutResolverReport: func(_ kvdb.RwTx,
_ *channeldb.ResolverReport) error {