Fix lint errors
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
f17929f032
commit
1bd28bdb6a
@ -96,7 +96,7 @@ type mockBeacon struct {
|
||||
interval time.Duration
|
||||
}
|
||||
|
||||
func NewMockBeacon(interval time.Duration) *mockBeacon {
|
||||
func NewMockBeacon(interval time.Duration) DrandBeacon {
|
||||
mb := &mockBeacon{interval: interval}
|
||||
|
||||
return mb
|
||||
|
@ -284,7 +284,7 @@ func (cg *ChainGen) nextBlockProof(ctx context.Context, pts *types.TipSet, m add
|
||||
return nil, nil, nil, xerrors.Errorf("getLatestBeaconEntry: %w", err)
|
||||
}
|
||||
|
||||
entries, err := beacon.BeaconEntriesForBlock(ctx, cg.beacon, abi.ChainEpoch(round), *prev)
|
||||
entries, err := beacon.BeaconEntriesForBlock(ctx, cg.beacon, round, *prev)
|
||||
if err != nil {
|
||||
return nil, nil, nil, xerrors.Errorf("get beacon entries for block: %w", err)
|
||||
}
|
||||
@ -366,7 +366,7 @@ func (cg *ChainGen) NextTipSetFromMiners(base *types.TipSet, miners []address.Ad
|
||||
if et != nil {
|
||||
// TODO: winning post proof
|
||||
_ = ticket
|
||||
fblk, err := cg.makeBlock(base, m, ticket, et, bvals, abi.ChainEpoch(round), msgs)
|
||||
fblk, err := cg.makeBlock(base, m, ticket, et, bvals, round, msgs)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("making a block for next tipset failed: %w", err)
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ func MakeGenesisBlock(ctx context.Context, bs bstore.Blockstore, sys runtime.Sys
|
||||
BlockSig: nil,
|
||||
Timestamp: template.Timestamp,
|
||||
BeaconEntries: []types.BeaconEntry{
|
||||
types.BeaconEntry{
|
||||
{
|
||||
Round: 0,
|
||||
Data: make([]byte, 32),
|
||||
},
|
||||
|
@ -266,6 +266,6 @@ type fakeRand struct{}
|
||||
|
||||
func (fr *fakeRand) GetRandomness(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) ([]byte, error) {
|
||||
out := make([]byte, 32)
|
||||
rand.New(rand.NewSource(int64(randEpoch))).Read(out)
|
||||
_, _ = rand.New(rand.NewSource(int64(randEpoch))).Read(out)
|
||||
return out, nil
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ func TestForkHeightTriggers(t *testing.T) {
|
||||
}
|
||||
|
||||
return []*types.SignedMessage{
|
||||
&types.SignedMessage{
|
||||
{
|
||||
Signature: *sig,
|
||||
Message: *m,
|
||||
},
|
||||
|
@ -424,7 +424,7 @@ func (m *Miner) createBlock(base *MiningBase, addr address.Address, ticket *type
|
||||
nheight := base.ts.Height() + base.nullRounds + 1
|
||||
|
||||
// why even return this? that api call could just submit it for us
|
||||
return m.api.MinerCreateBlock(context.TODO(), addr, base.ts.Key(), ticket, eproof, bvals, msgs, nheight, uint64(uts))
|
||||
return m.api.MinerCreateBlock(context.TODO(), addr, base.ts.Key(), ticket, eproof, bvals, msgs, nheight, uts)
|
||||
}
|
||||
|
||||
type ActorLookup func(context.Context, address.Address, types.TipSetKey) (*types.Actor, error)
|
||||
|
@ -23,11 +23,11 @@ func TestMessageFiltering(t *testing.T) {
|
||||
a2 := mustIDAddr(2)
|
||||
|
||||
actors := map[address.Address]*types.Actor{
|
||||
a1: &types.Actor{
|
||||
a1: {
|
||||
Nonce: 3,
|
||||
Balance: types.NewInt(1200),
|
||||
},
|
||||
a2: &types.Actor{
|
||||
a2: {
|
||||
Nonce: 1,
|
||||
Balance: types.NewInt(1000),
|
||||
},
|
||||
@ -38,7 +38,7 @@ func TestMessageFiltering(t *testing.T) {
|
||||
}
|
||||
|
||||
msgs := []types.Message{
|
||||
types.Message{
|
||||
{
|
||||
From: a1,
|
||||
To: a1,
|
||||
Nonce: 3,
|
||||
@ -46,7 +46,7 @@ func TestMessageFiltering(t *testing.T) {
|
||||
GasLimit: 50,
|
||||
GasPrice: types.NewInt(1),
|
||||
},
|
||||
types.Message{
|
||||
{
|
||||
From: a1,
|
||||
To: a1,
|
||||
Nonce: 4,
|
||||
@ -54,7 +54,7 @@ func TestMessageFiltering(t *testing.T) {
|
||||
GasLimit: 50,
|
||||
GasPrice: types.NewInt(1),
|
||||
},
|
||||
types.Message{
|
||||
{
|
||||
From: a2,
|
||||
To: a1,
|
||||
Nonce: 1,
|
||||
@ -62,7 +62,7 @@ func TestMessageFiltering(t *testing.T) {
|
||||
GasLimit: 100,
|
||||
GasPrice: types.NewInt(1),
|
||||
},
|
||||
types.Message{
|
||||
{
|
||||
From: a2,
|
||||
To: a1,
|
||||
Nonce: 0,
|
||||
@ -70,7 +70,7 @@ func TestMessageFiltering(t *testing.T) {
|
||||
GasLimit: 100,
|
||||
GasPrice: types.NewInt(1),
|
||||
},
|
||||
types.Message{
|
||||
{
|
||||
From: a2,
|
||||
To: a1,
|
||||
Nonce: 2,
|
||||
|
Loading…
Reference in New Issue
Block a user