Skip to content

Commit b06a2dd

Browse files
committed
chore: fix lint
1 parent d8c8d21 commit b06a2dd

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

pkg/chain/randomness.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (g *GenesisRandomnessSource) GetChainRandomness(ctx context.Context, randEp
5555
_, _ = rand.New(rand.NewSource(int64(randEpoch))).Read(out) //nolint
5656
return *(*[32]byte)(out), nil
5757
}
58-
func (r *GenesisRandomnessSource) GetBeaconEntry(_ context.Context, randEpoch abi.ChainEpoch) (*types.BeaconEntry, error) {
58+
func (g *GenesisRandomnessSource) GetBeaconEntry(_ context.Context, randEpoch abi.ChainEpoch) (*types.BeaconEntry, error) {
5959
out := make([]byte, 32)
6060
_, _ = rand.New(rand.NewSource(int64(randEpoch))).Read(out) //nolint
6161
return &types.BeaconEntry{Round: 10, Data: out}, nil

pkg/vm/vmcontext/types.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"time"
88

9-
// "github.com/dchest/blake2b"
9+
"github.com/dchest/blake2b"
1010
"github.com/filecoin-project/go-address"
1111
"github.com/filecoin-project/go-state-types/crypto"
1212
"github.com/filecoin-project/go-state-types/exitcode"
@@ -15,10 +15,8 @@ import (
1515
"github.com/filecoin-project/venus/venus-shared/actors/builtin/account"
1616
blockstoreutil "github.com/filecoin-project/venus/venus-shared/blockstore"
1717
"github.com/filecoin-project/venus/venus-shared/types"
18-
must "github.com/filecoin-project/venus/venus-shared/utils"
1918
cbor "github.com/ipfs/go-ipld-cbor"
2019
"github.com/pkg/errors"
21-
"golang.org/x/crypto/blake2b"
2220

2321
"github.com/filecoin-project/go-state-types/abi"
2422
"github.com/filecoin-project/go-state-types/network"
@@ -106,7 +104,7 @@ type HeadChainRandomness interface {
106104
}
107105

108106
func DrawRandomnessFromDigest(digest [32]byte, pers crypto.DomainSeparationTag, round abi.ChainEpoch, entropy []byte) ([]byte, error) {
109-
h := must.One(blake2b.New256(nil))
107+
h := blake2b.New256()
110108
if err := binary.Write(h, binary.BigEndian, int64(pers)); err != nil {
111109
return nil, fmt.Errorf("deriving randomness: %w", err)
112110
}

0 commit comments

Comments
 (0)