diff --git a/pkg/wallethandler/config.yaml b/pkg/wallethandler/config.yaml index d8a4b47..0ca022a 100644 --- a/pkg/wallethandler/config.yaml +++ b/pkg/wallethandler/config.yaml @@ -8,7 +8,7 @@ minimumPayout: 25000000000 txFee: 100000000 poolFeeShare: 0.0 deadlineLimit: 10000000000 -SodiumDeadlines: true +sodiumDeadlines: true walletDB: user: "root" password: "" diff --git a/pkg/webserver/webserver.go b/pkg/webserver/webserver.go index b94240f..fc97876 100644 --- a/pkg/webserver/webserver.go +++ b/pkg/webserver/webserver.go @@ -14,6 +14,7 @@ import ( "sync/atomic" "text/template" "time" + "math" "github.com/PoC-Consortium/Nogrod/pkg/api" "github.com/PoC-Consortium/Nogrod/pkg/burstmath" @@ -431,6 +432,9 @@ func (webServer *WebServer) checkForNewBestSubmission() { if blockInfo.Height == newBestNonceSubmission.Height && (blockInfo.Deadline == 0 || blockInfo.Deadline > newBestNonceSubmission.Deadline) { blockInfo.Deadline = newBestNonceSubmission.Deadline + if Cfg.SodiumDeadlines { + blockInfo.Deadline = uint64(math.Log(float64(blockInfo.Deadline))*240/math.Log(240)) + } blockInfo.MinerID = newBestNonceSubmission.MinerID if newBestNonceSubmission.Name != "" { blockInfo.Miner = newBestNonceSubmission.Name