• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 15561477203

10 Jun 2025 01:54PM UTC coverage: 58.351% (-10.1%) from 68.487%
15561477203

Pull #9356

github

web-flow
Merge 6440b25db into c6d6d4c0b
Pull Request #9356: lnrpc: add incoming/outgoing channel ids filter to forwarding history request

33 of 36 new or added lines in 2 files covered. (91.67%)

28366 existing lines in 455 files now uncovered.

97715 of 167461 relevant lines covered (58.35%)

1.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lnwallet/chainfee/mocks.go
1
package chainfee
2

3
import (
4
        "github.com/stretchr/testify/mock"
5
)
6

7
type mockFeeSource struct {
8
        mock.Mock
9
}
10

11
// A compile-time assertion to ensure that mockFeeSource implements the
12
// WebAPIFeeSource interface.
13
var _ WebAPIFeeSource = (*mockFeeSource)(nil)
14

UNCOV
15
func (m *mockFeeSource) GetFeeInfo() (WebAPIResponse, error) {
×
UNCOV
16
        args := m.Called()
×
UNCOV
17

×
UNCOV
18
        return args.Get(0).(WebAPIResponse), args.Error(1)
×
UNCOV
19
}
×
20

21
// MockEstimator implements the `Estimator` interface and is used by
22
// other packages for mock testing.
23
type MockEstimator struct {
24
        mock.Mock
25
}
26

27
// Compile time assertion that MockEstimator implements Estimator.
28
var _ Estimator = (*MockEstimator)(nil)
29

30
// EstimateFeePerKW takes in a target for the number of blocks until an initial
31
// confirmation and returns the estimated fee expressed in sat/kw.
32
func (m *MockEstimator) EstimateFeePerKW(
UNCOV
33
        numBlocks uint32) (SatPerKWeight, error) {
×
UNCOV
34

×
UNCOV
35
        args := m.Called(numBlocks)
×
UNCOV
36

×
UNCOV
37
        if args.Get(0) == nil {
×
38
                return 0, args.Error(1)
×
39
        }
×
40

UNCOV
41
        return args.Get(0).(SatPerKWeight), args.Error(1)
×
42
}
43

44
// Start signals the Estimator to start any processes or goroutines it needs to
45
// perform its duty.
46
func (m *MockEstimator) Start() error {
×
47
        args := m.Called()
×
48

×
49
        return args.Error(0)
×
50
}
×
51

52
// Stop stops any spawned goroutines and cleans up the resources used by the
53
// fee estimator.
54
func (m *MockEstimator) Stop() error {
×
55
        args := m.Called()
×
56

×
57
        return args.Error(0)
×
58
}
×
59

60
// RelayFeePerKW returns the minimum fee rate required for transactions to be
61
// relayed. This is also the basis for calculation of the dust limit.
UNCOV
62
func (m *MockEstimator) RelayFeePerKW() SatPerKWeight {
×
UNCOV
63
        args := m.Called()
×
UNCOV
64

×
UNCOV
65
        return args.Get(0).(SatPerKWeight)
×
UNCOV
66
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc