refactor: improvements on rest v2 server (#22292)

This commit is contained in:
Hieu Vu
2024-10-17 09:03:57 +00:00
committed by GitHub
parent 3440ad6e60
commit 20dd65b057
3 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ if [ -d "$SIMD_HOME" ]; then rm -rv $SIMD_HOME; fi
$SIMD_BIN config set client chain-id simapp-v2-chain
$SIMD_BIN config set client keyring-backend test
$SIMD_BIN config set client keyring-default-keyname alice
$SIMD_BIN config set app api.enable true
$SIMD_BIN config set app rest.enable true
$SIMD_BIN keys add alice --indiscreet
$SIMD_BIN keys add bob --indiscreet
$SIMD_BIN init simapp-v2-node --chain-id simapp-v2-chain
+1 -1
View File
@@ -12,7 +12,7 @@ import (
)
const (
ServerName = "rest-v2"
ServerName = "rest"
)
type Server[T transaction.Tx] struct {
+6
View File
@@ -41,6 +41,12 @@ max-recv-msg-size = 10485760
# The default value is math.MaxInt32.
max-send-msg-size = 2147483647
[rest]
# Enable defines if the REST server should be enabled.
enable = true
# Address defines the REST server address to bind to.
address = 'localhost:8080'
[server]
# minimum-gas-prices defines the price which a validator is willing to accept for processing a transaction. A transaction's fees must meet the minimum of any denomination specified in this config (e.g. 0.25token1;0.0001token2).
minimum-gas-prices = '0stake'