diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index d5ab189b0..e5754b26a 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -23,6 +23,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Install libssl + run: | + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb + sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb - uses: actions/setup-dotnet@v1 with: dotnet-version: '6.0.x' diff --git a/NBitcoin/NBitcoin.csproj b/NBitcoin/NBitcoin.csproj index 716cb6110..8c2ec5e65 100644 --- a/NBitcoin/NBitcoin.csproj +++ b/NBitcoin/NBitcoin.csproj @@ -12,7 +12,7 @@ git - 7.0.42 + 7.0.42.1 9.0 diff --git a/NBitcoin/RPC/RPCClient.cs b/NBitcoin/RPC/RPCClient.cs index 8e576363e..9db668e60 100644 --- a/NBitcoin/RPC/RPCClient.cs +++ b/NBitcoin/RPC/RPCClient.cs @@ -2029,7 +2029,7 @@ public async Task BumpFeeAsync(uint256 txid, CancellationToken can /// Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. /// The estimated fee rate, block number where estimate was found /// The Fee rate couldn't be estimated because of insufficient data from Bitcoin Core - public EstimateSmartFeeResponse EstimateSmartFee(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative) + public EstimateSmartFeeResponse EstimateSmartFee(int confirmationTarget, EstimateSmartFeeMode? estimateMode = null) { return EstimateSmartFeeAsync(confirmationTarget, estimateMode).GetAwaiter().GetResult(); } @@ -2041,7 +2041,7 @@ public EstimateSmartFeeResponse EstimateSmartFee(int confirmationTarget, Estimat /// Confirmation target in blocks (1 - 1008) /// Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. /// The estimated fee rate, block number where estimate was found or null - public async Task TryEstimateSmartFeeAsync(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative, CancellationToken cancellationToken = default) + public async Task TryEstimateSmartFeeAsync(int confirmationTarget, EstimateSmartFeeMode? estimateMode = null, CancellationToken cancellationToken = default) { return await EstimateSmartFeeImplAsync(confirmationTarget, estimateMode, cancellationToken).ConfigureAwait(false); } @@ -2053,7 +2053,7 @@ public async Task TryEstimateSmartFeeAsync(int confirm /// Confirmation target in blocks (1 - 1008) /// Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. /// The estimated fee rate, block number where estimate was found or null - public EstimateSmartFeeResponse TryEstimateSmartFee(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative) + public EstimateSmartFeeResponse TryEstimateSmartFee(int confirmationTarget, EstimateSmartFeeMode? estimateMode = null) { return TryEstimateSmartFeeAsync(confirmationTarget, estimateMode).GetAwaiter().GetResult(); } @@ -2066,7 +2066,7 @@ public EstimateSmartFeeResponse TryEstimateSmartFee(int confirmationTarget, Esti /// Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. /// The estimated fee rate, block number where estimate was found /// when fee couldn't be estimated - public async Task EstimateSmartFeeAsync(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative, CancellationToken cancellationToken = default) + public async Task EstimateSmartFeeAsync(int confirmationTarget, EstimateSmartFeeMode? estimateMode = null, CancellationToken cancellationToken = default) { var feeRate = await EstimateSmartFeeImplAsync(confirmationTarget, estimateMode, cancellationToken); if (feeRate == null) @@ -2077,12 +2077,12 @@ public async Task EstimateSmartFeeAsync(int confirmati /// /// (>= Bitcoin Core v0.14) /// - private async Task EstimateSmartFeeImplAsync(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative, CancellationToken cancellationToken = default) + private async Task EstimateSmartFeeImplAsync(int confirmationTarget, EstimateSmartFeeMode? estimateMode = null, CancellationToken cancellationToken = default) { if (Capabilities == null || Capabilities.SupportEstimateSmartFee) { var parameters = new List() { confirmationTarget }; - if (estimateMode != EstimateSmartFeeMode.Conservative) + if (estimateMode != null) { parameters.Add(estimateMode.ToString().ToUpperInvariant()); }