From b1fe62c336a97e28ca8310e205a0c7fe96854392 Mon Sep 17 00:00:00 2001 From: Loshan T Date: Fri, 12 Mar 2021 15:08:46 +0000 Subject: [PATCH] bech32 changes (#21) * add BRPeerManagerStandardPort method which returns the standard port used for chain params * update secp256k1 Co-authored-by: Mohamed Barry --- BRPeerManager.c | 9 +++++++++ BRPeerManager.h | 3 +++ secp256k1 | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) 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