mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
change Subscribe#out cap to 1
and replace config vars with RPCConfig
This commit is contained in:
@ -1,8 +1,7 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/consensus"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
@ -74,14 +73,7 @@ var (
|
||||
|
||||
logger log.Logger
|
||||
|
||||
// config variables
|
||||
|
||||
// MaxSubscriptionClients mirrors RPCConfig.MaxSubscriptionClients
|
||||
MaxSubscriptionClients int
|
||||
// MaxSubscriptionsPerClient mirrors RPCConfig.MaxSubscriptionsPerClient
|
||||
MaxSubscriptionsPerClient int
|
||||
// TimeoutBroadcastTxCommit mirrors RPCConfig.TimeoutBroadcastTxCommit
|
||||
TimeoutBroadcastTxCommit time.Duration
|
||||
config cfg.RPCConfig
|
||||
)
|
||||
|
||||
func SetStateDB(db dbm.DB) {
|
||||
@ -144,6 +136,11 @@ func SetEventBus(b *types.EventBus) {
|
||||
eventBus = b
|
||||
}
|
||||
|
||||
// SetConfig sets an RPCConfig.
|
||||
func SetConfig(c cfg.RPCConfig) {
|
||||
config = c
|
||||
}
|
||||
|
||||
func validatePage(page, perPage, totalCount int) int {
|
||||
if perPage < 1 {
|
||||
return 1
|
||||
|
Reference in New Issue
Block a user