From 18a6867124c825d469482ddfdef7ca044d2328d3 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 6 Feb 2019 13:29:58 -0800 Subject: [PATCH] addrmgr/knownaddress: expose an address' service bits --- addrmgr/knownaddress.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addrmgr/knownaddress.go b/addrmgr/knownaddress.go index 4a8da83e..15469f37 100644 --- a/addrmgr/knownaddress.go +++ b/addrmgr/knownaddress.go @@ -33,6 +33,11 @@ func (ka *KnownAddress) LastAttempt() time.Time { return ka.lastattempt } +// Services returns the services supported by the peer with the known address. +func (ka *KnownAddress) Services() wire.ServiceFlag { + return ka.na.Services +} + // chance returns the selection probability for a known address. The priority // depends upon how recently the address has been seen, how recently it was last // attempted and how often attempts to connect to it have failed.