Commit 70a30240 authored by mdj33's avatar mdj33 Committed by 33cn

open batch download default

parent e9e133c1
......@@ -87,10 +87,10 @@ type subConfig struct {
WaitConsensStopTimes uint32 `json:"waitConsensStopTimes,omitempty"`
MaxCacheCount int64 `json:"maxCacheCount,omitempty"`
MaxSyncErrCount int32 `json:"maxSyncErrCount,omitempty"`
FetchFilterParaTxsEnable bool `json:"fetchFilterParaTxsEnable,omitempty"`
FetchFilterParaTxsClose bool `json:"fetchFilterParaTxsClose,omitempty"`
BatchFetchBlockCount int64 `json:"batchFetchBlockCount,omitempty"`
ParaConsensStartHeight int64 `json:"paraConsensStartHeight,omitempty"`
MultiDownloadOpen bool `json:"multiDownloadOpen,omitempty"`
MultiDownloadClose bool `json:"multiDownloadClose,omitempty"`
MultiDownInvNumPerJob int64 `json:"multiDownInvNumPerJob,omitempty"`
MultiDownJobBuffNum uint32 `json:"multiDownJobBuffNum,omitempty"`
MultiDownServerRspTime uint32 `json:"multiDownServerRspTime,omitempty"`
......
......@@ -318,7 +318,7 @@ func (client *client) getBatchSeqCount(currSeq int64) (int64, error) {
} else {
atomic.StoreInt32(&client.caughtUp, 1)
}
if client.subCfg.FetchFilterParaTxsEnable && lastSeq-currSeq > client.subCfg.BatchFetchBlockCount {
if !client.subCfg.FetchFilterParaTxsClose && lastSeq-currSeq > client.subCfg.BatchFetchBlockCount {
return client.subCfg.BatchFetchBlockCount - 1, nil
}
return 0, nil
......@@ -432,7 +432,7 @@ func (client *client) requestFilterParaTxs(currSeq int64, count int64, preMainBl
}
func (client *client) RequestTx(currSeq int64, count int64, preMainBlockHash []byte) (*types.ParaTxDetails, error) {
if client.subCfg.FetchFilterParaTxsEnable {
if !client.subCfg.FetchFilterParaTxsClose {
return client.requestFilterParaTxs(currSeq, count, preMainBlockHash)
}
......
......@@ -156,7 +156,7 @@ func (m *multiDldClient) getConns(inv *inventory) error {
}
func (m *multiDldClient) tryMultiServerDownload() {
if !m.paraClient.subCfg.MultiDownloadOpen {
if m.paraClient.subCfg.MultiDownloadClose {
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment