aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2016-03-26 18:58:00 +0100
committerPieter Wuille <[email protected]>2016-06-13 17:40:16 +0200
commit3764dec36c815267174951a4c64e17c07ee6302f (patch)
tree017bd6c2933f65f1b4ebbe34533e74c25e400dd0 /src/addrman.h
parentMerge #8141: Continuing port of java comparison tool (diff)
downloaddiscoin-3764dec36c815267174951a4c64e17c07ee6302f.tar.xz
discoin-3764dec36c815267174951a4c64e17c07ee6302f.zip
Keep addrman's nService bits consistent with outbound observations
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/addrman.h b/src/addrman.h
index c5923e941..7e36e2228 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -256,6 +256,9 @@ protected:
//! Mark an entry as currently-connected-to.
void Connected_(const CService &addr, int64_t nTime);
+ //! Update an entry's service bits.
+ void SetServices_(const CService &addr, uint64_t nServices);
+
public:
/**
* serialized format:
@@ -589,6 +592,14 @@ public:
}
}
+ void SetServices(const CService &addr, uint64_t nServices)
+ {
+ LOCK(cs);
+ Check();
+ SetServices_(addr, nServices);
+ Check();
+ }
+
};
#endif // BITCOIN_ADDRMAN_H