Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1318 from oliverw/dev
Browse files Browse the repository at this point in the history
Dev r72
  • Loading branch information
Oliver Weichhold authored Jul 17, 2022
2 parents 0989ed7 + c58a647 commit 8d40733
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Miningcore/Blockchain/Bitcoin/BitcoinPayoutHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public virtual async Task PayoutAsync(IMiningPool pool, Balance[] balances, Canc

var comment = $"{identifier} Payment";

if(!(extraPoolConfig?.HasBrokenSendMany == true || poolConfig.Template.As<BitcoinTemplate>().HasBrokenSendMany))
if(!(extraPoolConfig?.HasBrokenSendMany == true || poolConfig.Template is BitcoinTemplate { HasBrokenSendMany: true }))
{
if(extraPoolPaymentProcessingConfig?.MinersPayTxFees == true)
{
Expand Down
13 changes: 9 additions & 4 deletions src/Miningcore/Blockchain/Ergo/ErgoJobManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,16 @@ protected override async Task PostStartInitAsync(CancellationToken ct)
blockVersion = info.Parameters.BlockVersion;

// chain detection
var m = ErgoConstants.RegexChain.Match(info.Name);
if(!m.Success)
throw new PoolStartupException($"Unable to identify network type ({info.Name}", poolConfig.Id);
if(!string.IsNullOrEmpty(info.Network))
network = info.Network.ToLower();
else
{
var m = ErgoConstants.RegexChain.Match(info.Name);
if(!m.Success)
throw new PoolStartupException($"Unable to identify network type ({info.Name}", poolConfig.Id);

network = m.Groups[1].Value.ToLower();
network = m.Groups[1].Value.ToLower();
}

// Payment-processing setup
if(clusterConfig.PaymentProcessing?.Enabled == true && poolConfig.PaymentProcessing?.Enabled == true)
Expand Down
4 changes: 4 additions & 0 deletions src/Miningcore/Blockchain/Ergo/RPC/ErgoClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10897,6 +10897,10 @@ public partial class NodeInfo
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string Name { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("network", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string Network { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("appVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string AppVersion { get; set; } = default!;
Expand Down

0 comments on commit 8d40733

Please sign in to comment.