refactor!: instantiate client.TxConfig once for simulations (#15875)
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/types/simulation"
|
||||
)
|
||||
@@ -142,6 +143,7 @@ func (sm *SimulationManager) WeightedOperations(simState SimulationState) []simu
|
||||
type SimulationState struct {
|
||||
AppParams simulation.AppParams
|
||||
Cdc codec.JSONCodec // application codec
|
||||
TxConfig client.TxConfig // Shared TxConfig; this is expensive to create and stateless, so create it once up front.
|
||||
Rand *rand.Rand // random number
|
||||
GenState map[string]json.RawMessage // genesis state
|
||||
Accounts []simulation.Account // simulation accounts
|
||||
|
||||
Reference in New Issue
Block a user