routerrpc+zpay32: EstimateRouteFee overhaul

In this commit the mission control based fee estimation
is supplemented with a payment probe estimation which can
lead to more accurate estimation results. The probing
utilizes a hop-hint heurisic to detect routes through LSPs
in order to manually estimate fees to destinations behind
an LSP that would otherwise block the payment probe.
This commit is contained in:
Slyghtning committed 2024-03-05 09:24:27 +01:00
1 parent 24080c51f9
commit 7d9589ecbf
4 files changed
+645 -22

No files matched your search

+11 -1
View File
@@ -1175,8 +1175,18 @@ func unmarshallHopHint(rpcHint *lnrpc.HopHint) (zpay32.HopHint, error) {
}, nil
}
// MarshalFeatures converts a feature vector into a list of uint32's.
func MarshalFeatures(feats *lnwire.FeatureVector) []lnrpc.FeatureBit {
var featureBits []lnrpc.FeatureBit
for feature := range feats.Features() {
featureBits = append(featureBits, lnrpc.FeatureBit(feature))
}
return featureBits
}
// UnmarshalFeatures converts a list of uint32's into a valid feature vector.
// This method checks that feature bit pairs aren't assigned toegether, and
// This method checks that feature bit pairs aren't assigned together, and
// validates transitive dependencies.
func UnmarshalFeatures(
rpcFeatures []lnrpc.FeatureBit) (*lnwire.FeatureVector, error) {