Fix workid param hash
This commit is contained in:
parent
706f4f2ef5
commit
bb5cc06677
3
extern/sector-storage/manager_calltracker.go
vendored
3
extern/sector-storage/manager_calltracker.go
vendored
@ -3,6 +3,7 @@ package sectorstorage
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
"encoding/hex"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -47,7 +48,7 @@ func newWorkID(method string, params ...interface{}) (WorkID, error) {
|
|||||||
|
|
||||||
if len(pb) > 256 {
|
if len(pb) > 256 {
|
||||||
s := sha256.Sum256(pb)
|
s := sha256.Sum256(pb)
|
||||||
pb = s[:]
|
pb = []byte(hex.EncodeToString(s[:]))
|
||||||
}
|
}
|
||||||
|
|
||||||
return WorkID{
|
return WorkID{
|
||||||
|
Loading…
Reference in New Issue
Block a user