Skip to content
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

remove gbt limit to bps achieve 1 #626

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions services/miner/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,19 @@ func (api *PublicMinerAPI) SubmitBlockHeader(hexBlockHeader string, extraNonce *
}

func (api *PublicMinerAPI) checkSubmitLimit() error {
// if time.Since(api.miner.stats.LastestSubmit) < SubmitInterval {
// return fmt.Errorf("Submission interval Limited:%s < %s\n", time.Since(api.miner.stats.LastestSubmit), SubmitInterval)
// }
if params.ActiveNetParams.Name == params.MixNetParam.Name {
return nil
}
if time.Since(api.miner.stats.LastestSubmit) < SubmitInterval {
return fmt.Errorf("Submission interval Limited:%s < %s\n", time.Since(api.miner.stats.LastestSubmit), SubmitInterval)
}
return nil
}

func (api *PublicMinerAPI) checkGBTTime(txcount int) error {
if params.ActiveNetParams.Name == params.MixNetParam.Name {
return nil
}
if txcount < 1 && time.Since(api.miner.stats.LastestGbtRequest) < params.ActiveNetParams.TargetTimePerBlock {
log.Debug("[gbttxzreo]Client init download, qitmeer is sync tx...")
return rpc.RPCClientInInitialDownloadError("Client in initial download ",
Expand Down
Loading