REST tx endpoint backwards compatibility (#6801)
* update rest endpoints * Add conversion logic for auth encode/decode/broadcast * Cleanup * Add tx conversion to legacy REST tx endpoints. * Cleanup * Add tests * Add tests for ConvertAndEncodeStdTx * Fix for StdSignature * Test coverage improvements * Add integration test for REST broadcast Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network>
This commit is contained in:
co-authored by
Aaron Craelius
Aaron Craelius
parent
8283165600
commit
c7ad21d162
@@ -62,6 +62,7 @@ func NewSimApp(val Validator) servertypes.Application {
|
||||
// in-process local testing network.
|
||||
type Config struct {
|
||||
Codec codec.Marshaler
|
||||
LegacyAmino *codec.Codec
|
||||
TxConfig client.TxConfig
|
||||
AccountRetriever client.AccountRetriever
|
||||
AppConstructor AppConstructor // the ABCI application constructor
|
||||
@@ -88,6 +89,7 @@ func DefaultConfig() Config {
|
||||
return Config{
|
||||
Codec: encCfg.Marshaler,
|
||||
TxConfig: encCfg.TxConfig,
|
||||
LegacyAmino: encCfg.Amino,
|
||||
AccountRetriever: authtypes.NewAccountRetriever(encCfg.Marshaler),
|
||||
AppConstructor: NewSimApp,
|
||||
GenesisState: simapp.ModuleBasics.DefaultGenesis(encCfg.Marshaler),
|
||||
@@ -312,6 +314,7 @@ func New(t *testing.T, cfg Config) *Network {
|
||||
WithHomeDir(tmCfg.RootDir).
|
||||
WithChainID(cfg.ChainID).
|
||||
WithJSONMarshaler(cfg.Codec).
|
||||
WithCodec(cfg.LegacyAmino).
|
||||
WithTxConfig(cfg.TxConfig).
|
||||
WithAccountRetriever(cfg.AccountRetriever)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user