chainfee: add a new interface method GetFeeMap
This commit adds a new method `GetFeeMap` to handle querying the web API and parse the response into a map that's used by the fee estimator. In doing so we can provide a deeper abstraction over the `WebAPIFeeSource` interface.
This commit is contained in:
2 files changed
+51
-29
No files matched your search
@@ -24,6 +24,10 @@ func (e mockSparseConfFeeSource) ParseResponse(r io.Reader) (map[uint32]uint32,
|
||||
return e.fees, nil
|
||||
}
|
||||
|
||||
func (e mockSparseConfFeeSource) GetFeeMap() (map[uint32]uint32, error) {
|
||||
return e.fees, nil
|
||||
}
|
||||
|
||||
// TestFeeRateTypes checks that converting fee rates between the
|
||||
// different types that represent fee rates and calculating fees
|
||||
// work as expected.
|
||||
|
||||
Reference in new issue
Block a user