More test fixing
This commit is contained in:
parent
59e5144122
commit
bbfa66636d
@ -132,7 +132,7 @@ type FullNodeStruct struct {
|
|||||||
StateMinerPower func(context.Context, address.Address, types.TipSetKey) (*api.MinerPower, error) `perm:"read"`
|
StateMinerPower func(context.Context, address.Address, types.TipSetKey) (*api.MinerPower, error) `perm:"read"`
|
||||||
StateMinerInfo func(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) `perm:"read"`
|
StateMinerInfo func(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) `perm:"read"`
|
||||||
StateMinerDeadlines func(context.Context, address.Address, types.TipSetKey) ([]*miner.Deadline, error) `perm:"read"`
|
StateMinerDeadlines func(context.Context, address.Address, types.TipSetKey) ([]*miner.Deadline, error) `perm:"read"`
|
||||||
StateMinerPartitions func(context.Context, address.Address, uint64, types.TipSetKey) ([]*miner.Partition, error)
|
StateMinerPartitions func(context.Context, address.Address, uint64, types.TipSetKey) ([]*miner.Partition, error) `perm:"read"`
|
||||||
StateMinerFaults func(context.Context, address.Address, types.TipSetKey) (*abi.BitField, error) `perm:"read"`
|
StateMinerFaults func(context.Context, address.Address, types.TipSetKey) (*abi.BitField, error) `perm:"read"`
|
||||||
StateAllMinerFaults func(context.Context, abi.ChainEpoch, types.TipSetKey) ([]*api.Fault, error) `perm:"read"`
|
StateAllMinerFaults func(context.Context, abi.ChainEpoch, types.TipSetKey) ([]*api.Fault, error) `perm:"read"`
|
||||||
StateMinerRecoveries func(context.Context, address.Address, types.TipSetKey) (*abi.BitField, error) `perm:"read"`
|
StateMinerRecoveries func(context.Context, address.Address, types.TipSetKey) (*abi.BitField, error) `perm:"read"`
|
||||||
|
@ -436,7 +436,16 @@ func createEmptyMinerState(ctx context.Context, t *testing.T, store *cbornode.Ba
|
|||||||
emptyMap, err := store.Put(context.TODO(), hamt.NewNode(store, hamt.UseTreeBitWidth(5)))
|
emptyMap, err := store.Put(context.TODO(), hamt.NewNode(store, hamt.UseTreeBitWidth(5)))
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
emptyDeadlines := miner.ConstructDeadlines()
|
emptyDeadline, err := store.Put(context.TODO(), &miner.Deadline{
|
||||||
|
Partitions: emptyArrayCid,
|
||||||
|
ExpirationsEpochs: emptyArrayCid,
|
||||||
|
PostSubmissions: abi.NewBitField(),
|
||||||
|
EarlyTerminations: abi.NewBitField(),
|
||||||
|
LiveSectors: 0,
|
||||||
|
})
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
emptyDeadlines := miner.ConstructDeadlines(emptyDeadline)
|
||||||
emptyDeadlinesCid, err := store.Put(context.Background(), emptyDeadlines)
|
emptyDeadlinesCid, err := store.Put(context.Background(), emptyDeadlines)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
@ -644,6 +644,8 @@ func (st *storage) storeMiners(minerTips map[types.TipSetKey][]*minerStateInfo)
|
|||||||
pid = peerid.String()
|
pid = peerid.String()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
panic("TODO")
|
||||||
if _, err := stmt.Exec(
|
if _, err := stmt.Exec(
|
||||||
miner.addr.String(),
|
miner.addr.String(),
|
||||||
miner.info.Owner.String(),
|
miner.info.Owner.String(),
|
||||||
@ -652,7 +654,7 @@ func (st *storage) storeMiners(minerTips map[types.TipSetKey][]*minerStateInfo)
|
|||||||
miner.info.SectorSize.ShortString(),
|
miner.info.SectorSize.ShortString(),
|
||||||
miner.state.PreCommitDeposits.String(),
|
miner.state.PreCommitDeposits.String(),
|
||||||
miner.state.LockedFunds.String(),
|
miner.state.LockedFunds.String(),
|
||||||
miner.state.NextDeadlineToProcessFaults,
|
0, //miner.state.NextDeadlineToProcessFaults,
|
||||||
); err != nil {
|
); err != nil {
|
||||||
log.Errorw("failed to store miner state", "state", miner.state, "info", miner.info, "error", err)
|
log.Errorw("failed to store miner state", "state", miner.state, "info", miner.info, "error", err)
|
||||||
return err
|
return err
|
||||||
|
@ -375,7 +375,8 @@ func syncHead(ctx context.Context, api api.FullNode, st *storage, headTs *types.
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
rewardInfo.baselinePower = rewardActorState.BaselinePower
|
panic("TODO")
|
||||||
|
//rewardInfo.baselinePower = rewardActorState.BaselinePower
|
||||||
})
|
})
|
||||||
log.Infow("Completed Reward Processing", "duration", time.Since(rewardProcessingStartedAt).String(), "processed", len(rewardTips))
|
log.Infow("Completed Reward Processing", "duration", time.Since(rewardProcessingStartedAt).String(), "processed", len(rewardTips))
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ var provingDeadlinesCmd = &cli.Command{
|
|||||||
if di.Index == uint64(dlIdx) {
|
if di.Index == uint64(dlIdx) {
|
||||||
cur += "\t(current)"
|
cur += "\t(current)"
|
||||||
}
|
}
|
||||||
_, _ = fmt.Fprintf(tw, "%d\t%d\t%d\t%d%s\n", dlIdx, len(partitions), provenPartitions)
|
_, _ = fmt.Fprintf(tw, "%d\t%d\t%d%s\n", dlIdx, len(partitions), provenPartitions, cur)
|
||||||
}
|
}
|
||||||
|
|
||||||
return tw.Flush()
|
return tw.Flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user