-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add produced blocks info #5290
add produced blocks info #5290
Conversation
cmd/lotus-storage-miner/info.go
Outdated
if err != nil { | ||
return err | ||
} | ||
blockReward, err := rewardActorState.ThisEpochReward() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this per win?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is State.ThisEpochReward
in reward. reference
code
cmd/lotus-storage-miner/info.go
Outdated
@@ -355,3 +370,40 @@ func sectorsInfo(ctx context.Context, napi api.StorageMiner) error { | |||
|
|||
return nil | |||
} | |||
|
|||
func producedBlocks(ctx context.Context, count int, head *types.TipSet, maddr address.Address, napi api.FullNode) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How long does it take for 1 day / week / month?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it depend on how many produced block one day.
when miner produce 10-20 blocks one day, it take less 3 minutes for one day include stat produced blocks and all gas cost(need message replay, maybe cost most time).
@magik6k needs to test this on a miner. |
@magik6k did you test this? If not I think anyone can test in a devnet with enough setup if you write down the testing steps here. |
fix #314 add produced blocks info.