From 9ed77c4a247267699beb7b7b73acb80808d1f40a Mon Sep 17 00:00:00 2001 From: yuriy0803 <68668177+yuriy0803@users.noreply.github.com> Date: Sun, 7 May 2023 20:02:16 +0200 Subject: [PATCH] Antminer E9 Pro doesn't work properly Antminer E9 Pro doesn't work properly --- util/util.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/util/util.go b/util/util.go index b261491..0431ef8 100644 --- a/util/util.go +++ b/util/util.go @@ -36,17 +36,7 @@ func MakeTimestamp() int64 { func GetTargetHex(diff int64) string { difficulty := big.NewInt(diff) diff1 := new(big.Int).Div(pow256, difficulty) - targetBytes := diff1.Bytes() - - // The target bytes should be exactly 32 bytes long. - if len(targetBytes) < 32 { - padding := make([]byte, 32-len(targetBytes)) - targetBytes = append(padding, targetBytes...) - } - - targetStr := hexutil.Encode(targetBytes) - - return targetStr + return string(hexutil.Encode(diff1.Bytes())) } func TargetHexToDiff(targetHex string) *big.Int {