common -> cmn

This commit is contained in:
Jae Kwon
2017-01-23 20:26:17 -08:00
parent a33b75fe8b
commit 9745f07bee
15 changed files with 42 additions and 42 deletions

View File

@ -7,7 +7,7 @@ import (
"github.com/tendermint/abci/server"
"github.com/tendermint/abci/types"
common "github.com/tendermint/go-common"
cmn "github.com/tendermint/go-common"
)
func main() {
@ -23,7 +23,7 @@ func main() {
}
// Wait forever
common.TrapSignal(func() {
cmn.TrapSignal(func() {
// Cleanup
srv.Stop()
})

View File

@ -8,7 +8,7 @@ import (
"testing"
"github.com/tendermint/abci/types"
common "github.com/tendermint/go-common"
cmn "github.com/tendermint/go-common"
"github.com/tendermint/go-crypto"
"github.com/tendermint/go-wire"
)
@ -109,7 +109,7 @@ func TestValSetChanges(t *testing.T) {
vals := make([]*types.Validator, total)
for i := 0; i < total; i++ {
pubkey := crypto.GenPrivKeyEd25519FromSecret([]byte(fmt.Sprintf("test%d", i))).PubKey().Bytes()
power := common.RandInt()
power := cmn.RandInt()
vals[i] = &types.Validator{pubkey, uint64(power)}
}
// iniitalize with the first nInit

View File

@ -8,7 +8,7 @@ import (
"strings"
"github.com/tendermint/abci/types"
common "github.com/tendermint/go-common"
cmn "github.com/tendermint/go-common"
dbm "github.com/tendermint/go-db"
"github.com/tendermint/go-merkle"
"github.com/tendermint/go-wire"
@ -150,7 +150,7 @@ func SaveLastBlock(db dbm.DB, lastBlock LastBlockInfo) {
wire.WriteBinary(lastBlock, buf, n, err)
if *err != nil {
// TODO
common.PanicCrisis(*err)
cmn.PanicCrisis(*err)
}
db.Set(lastBlockKey, buf.Bytes())
}

View File

@ -17,7 +17,7 @@ import (
nilapp "github.com/tendermint/abci/example/nil"
"github.com/tendermint/abci/server"
"github.com/tendermint/abci/types"
common "github.com/tendermint/go-common"
cmn "github.com/tendermint/go-common"
)
func TestDummy(t *testing.T) {
@ -105,7 +105,7 @@ func testStream(t *testing.T, app types.Application) {
// test grpc
func dialerFunc(addr string, timeout time.Duration) (net.Conn, error) {
return common.Connect(addr)
return cmn.Connect(addr)
}
func testGRPCSync(t *testing.T, app *types.GRPCApplication) {