diff --git a/BRPeerManager.c b/BRPeerManager.c index b42618c91..3aa21d59d 100644 --- a/BRPeerManager.c +++ b/BRPeerManager.c @@ -1632,6 +1632,15 @@ void BRPeerManagerSetFixedPeer(BRPeerManager *manager, UInt128 address, uint16_t pthread_mutex_unlock(&manager->lock); } +uint16_t BRPeerManagerStandardPort(BRPeerManager *manager) +{ + assert(manager != NULL); + pthread_mutex_lock(&manager->lock); + uint16_t port = manager->params->standardPort; + pthread_mutex_unlock(&manager->lock); + return port; +} + // current connect status BRPeerStatus BRPeerManagerConnectStatus(BRPeerManager *manager) { diff --git a/BRPeerManager.h b/BRPeerManager.h index f01aa0af5..55c097e45 100644 --- a/BRPeerManager.h +++ b/BRPeerManager.h @@ -72,6 +72,9 @@ void BRPeerManagerSetFixedPeer(BRPeerManager *manager, UInt128 address, uint16_t // current connect status BRPeerStatus BRPeerManagerConnectStatus(BRPeerManager *manager); +// returns the standard port used for BRChainParams +uint16_t BRPeerManagerStandardPort(BRPeerManager *manager); + // connect to bitcoin peer-to-peer network (also call this whenever networkIsReachable() status changes) void BRPeerManagerConnect(BRPeerManager *manager); diff --git a/secp256k1 b/secp256k1 index cd329dbc3..c663397f4 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit cd329dbc3eaf096ae007e807b86b6f5947621ee3 +Subproject commit c663397f46152e96c548ba392858c730e132dd7a