import tendermint/test to init ~/.tendermint_test/*
This commit is contained in:
parent
3565db4eef
commit
b8c735bd59
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"accounts": [
|
||||
{
|
||||
"address": "1D7A91CB32F758A02EBB9BE1FB6F8DEE56F90D42",
|
||||
"amount": 200000000
|
||||
},
|
||||
{
|
||||
"address": "AC89A6DDF4C309A89A2C4078CE409A5A7B282270",
|
||||
"amount": 200000000
|
||||
}
|
||||
],
|
||||
"validators": [
|
||||
{
|
||||
"pub_key": [1, "06FBAC4E285285D1D91FCBC7E91C780ADA11516F67462340B3980CE2B94940E8"],
|
||||
"amount": 1000000,
|
||||
"unbond_to": [
|
||||
{
|
||||
"address": "1D7A91CB32F758A02EBB9BE1FB6F8DEE56F90D42",
|
||||
"amount": 100000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package rpc
|
||||
package rpctest
|
||||
|
||||
import (
|
||||
_ "github.com/tendermint/tendermint/test"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package rpc
|
||||
package rpctest
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/tendermint/tendermint/account"
|
||||
"github.com/tendermint/tendermint/binary"
|
||||
"github.com/tendermint/tendermint/rpc/types"
|
||||
_ "github.com/tendermint/tendermint/test"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
package rpctest
|
||||
|
||||
import (
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
)
|
||||
|
||||
var config cfg.Config = nil
|
||||
|
||||
func init() {
|
||||
cfg.OnConfig(func(newConfig cfg.Config) {
|
||||
config = newConfig
|
||||
})
|
||||
}
|
|
@ -1,12 +1,10 @@
|
|||
package rpc
|
||||
package rpctest
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"github.com/tendermint/tendermint/account"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
tmcfg "github.com/tendermint/tendermint/config/tendermint_test"
|
||||
"github.com/tendermint/tendermint/consensus"
|
||||
nm "github.com/tendermint/tendermint/node"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
|
@ -20,10 +18,9 @@ import (
|
|||
|
||||
// global variables for use across all tests
|
||||
var (
|
||||
config cfg.Config = nil
|
||||
rpcAddr = "127.0.0.1:36657" // Not 46657
|
||||
requestAddr = "http://" + rpcAddr + "/"
|
||||
websocketAddr = "ws://" + rpcAddr + "/events"
|
||||
rpcAddr = "127.0.0.1:36657" // Not 46657
|
||||
requestAddr = "http://" + rpcAddr + "/"
|
||||
websocketAddr = "ws://" + rpcAddr + "/events"
|
||||
|
||||
node *nm.Node
|
||||
|
||||
|
@ -77,9 +74,6 @@ func newNode(ready chan struct{}) {
|
|||
|
||||
// initialize config and create new node
|
||||
func init() {
|
||||
config = tmcfg.GetConfig("")
|
||||
cfg.ApplyConfig(config)
|
||||
|
||||
// Save new priv_validator file.
|
||||
priv := &state.PrivValidator{
|
||||
Address: decodeHex(userAddr),
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
package rpc
|
|
@ -1,4 +1,4 @@
|
|||
package rpc
|
||||
package rpctest
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package rpc
|
||||
package rpctest
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/tendermint/tendermint/binary"
|
||||
_ "github.com/tendermint/tendermint/test"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"testing"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue