diff --git a/Godeps/_workspace/src/github.com/tendermint/tendermint/vm/vm.go b/Godeps/_workspace/src/github.com/tendermint/tendermint/vm/vm.go index 78f35c0510869034ed8e56e0380fe2a2c0e04cd3..9eb275701ff42abfc2aee24f07837d1e9a71e507 100644 --- a/Godeps/_workspace/src/github.com/tendermint/tendermint/vm/vm.go +++ b/Godeps/_workspace/src/github.com/tendermint/tendermint/vm/vm.go @@ -703,7 +703,6 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas vm.appState.AddLog(log) if vm.evc != nil { eventId := types.EventStringLogEvent(callee.Address.Postfix(20)) - fmt.Printf("eventId: %s\n", eventId) vm.evc.FireEvent(eventId, log) } // Using sol-log for this as well since 'log' will print garbage. diff --git a/erisdb/json_service.go b/erisdb/json_service.go index d80255f97a1e4a751a019ad039d601ef31e952ba..c08eec29eaa8a848daa828c335c5ba922b5324dc 100644 --- a/erisdb/json_service.go +++ b/erisdb/json_service.go @@ -2,7 +2,6 @@ package erisdb import ( "encoding/json" - "fmt" "github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/gin-gonic/gin" ep "github.com/eris-ltd/eris-db/erisdb/pipe" rpc "github.com/eris-ltd/eris-db/rpc" @@ -117,10 +116,10 @@ func (this *ErisDbJsonService) writeError(msg, id string, code int, w http.Respo // Helper for writing responses. func (this *ErisDbJsonService) writeResponse(id string, result interface{}, w http.ResponseWriter) { - fmt.Printf("Result: %v\n", result) + log.Debug("Result: %v\n", result) response := rpc.NewRPCResponse(id, result) err := this.codec.Encode(response, w) - fmt.Printf("Response: %v\n", response) + log.Debug("Response: %v\n", response) if err != nil { this.writeError("Internal error: "+err.Error(), id, rpc.INTERNAL_ERROR, w) return diff --git a/erisdb/methods.go b/erisdb/methods.go index 13fe8744eebd5fd84e6239d506b747de4df3a3e9..7a27628da3939ec2b4edb1ae0102017fa8c006b4 100644 --- a/erisdb/methods.go +++ b/erisdb/methods.go @@ -3,7 +3,6 @@ package erisdb import ( "crypto/rand" "encoding/hex" - "fmt" "github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/types" ep "github.com/eris-ltd/eris-db/erisdb/pipe" rpc "github.com/eris-ltd/eris-db/rpc" @@ -151,12 +150,10 @@ func (this *ErisDbMethods) Account(request *rpc.RPCRequest, requester interface{ func (this *ErisDbMethods) Accounts(request *rpc.RPCRequest, requester interface{}) (interface{}, int, error) { param := &AccountsParam{} - fmt.Printf("ACCOUNT LIST REQUEST: %v\n", request) err := this.codec.DecodeBytes(param, request.Params) if err != nil { return nil, rpc.INVALID_PARAMS, err } - fmt.Printf("PARAMS: %v\n", param) list, errC := this.pipe.Accounts().Accounts(param.Filters) if errC != nil { return nil, rpc.INTERNAL_ERROR, errC @@ -473,12 +470,10 @@ func (this *ErisDbMethods) NameRegEntry(request *rpc.RPCRequest, requester inter func (this *ErisDbMethods) NameRegEntries(request *rpc.RPCRequest, requester interface{}) (interface{}, int, error) { param := &FilterListParam{} - fmt.Printf("ACCOUNT LIST REQUEST: %v\n", request) err := this.codec.DecodeBytes(param, request.Params) if err != nil { return nil, rpc.INVALID_PARAMS, err } - fmt.Printf("PARAMS: %v\n", param) list, errC := this.pipe.NameReg().Entries(param.Filters) if errC != nil { return nil, rpc.INTERNAL_ERROR, errC diff --git a/erisdb/pipe/transactor.go b/erisdb/pipe/transactor.go index b95f87badaf54e3ea593807c42832997e96d3b16..a0cfb8b4eba83b59605f7779ef4b1ad6ff3665bf 100644 --- a/erisdb/pipe/transactor.go +++ b/erisdb/pipe/transactor.go @@ -135,7 +135,6 @@ func (this *transactor) Transact(privKey, address, data []byte, gasLimit, fee in } pk := &[64]byte{} copy(pk[:], privKey) - fmt.Printf("PK BYTES FROM TRANSACT: %x\n", pk) this.txMtx.Lock() defer this.txMtx.Unlock() pa := account.GenPrivAccountFromPrivKeyBytes(pk) @@ -147,6 +146,7 @@ func (this *transactor) Transact(privKey, address, data []byte, gasLimit, fee in } else { sequence = acc.Sequence + 1 } + // fmt.Printf("Sequence %d\n", sequence) txInput := &types.TxInput{ Address: pa.Address, Amount: 1, @@ -217,7 +217,8 @@ func (this *transactor) TransactNameReg(privKey []byte, name, data string, amoun } pk := &[64]byte{} copy(pk[:], privKey) - fmt.Printf("PK BYTES FROM TRANSACT NAMEREG: %x\n", pk) + this.txMtx.Lock() + defer this.txMtx.Unlock() pa := account.GenPrivAccountFromPrivKeyBytes(pk) cache := this.mempoolReactor.Mempool.GetCache() acc := cache.GetAccount(pa.Address) diff --git a/erisdb/serve.go b/erisdb/serve.go index 11343d1481e7dae2e78176906e36774c651ab9d4..2f9bcd608b93b0f33f758fed36d7357ffdf7d632 100644 --- a/erisdb/serve.go +++ b/erisdb/serve.go @@ -14,7 +14,7 @@ import ( "path" ) -const ERISDB_VERSION = "0.11.4" +const ERISDB_VERSION = "0.11.5" const TENDERMINT_VERSION = "0.5.0" var log = log15.New("module", "eris/erisdb_server") diff --git a/erisdb/wsService.go b/erisdb/wsService.go index 258cccea795696acba82149b0b616528286a62f6..cd19e36ba47b98fa74c3a367599cd9c05c5538c8 100644 --- a/erisdb/wsService.go +++ b/erisdb/wsService.go @@ -30,7 +30,7 @@ func NewErisDbWsService(codec rpc.Codec, pipe ep.Pipe) server.WebSocketService { // Process a request. func (this *ErisDbWsService) Process(msg []byte, session *server.WSSession) { - fmt.Printf("REQUEST: %s\n", string(msg)) + log.Debug("REQUEST: %s\n", string(msg)) // Create new request object and unmarshal. req := &rpc.RPCRequest{} errU := json.Unmarshal(msg, req) @@ -76,7 +76,7 @@ func (this *ErisDbWsService) writeError(msg, id string, code int, session *serve func (this *ErisDbWsService) writeResponse(id string, result interface{}, session *server.WSSession) { response := rpc.NewRPCResponse(id, result) bts, err := this.codec.EncodeBytes(response) - fmt.Printf("Response: %v\n", response) + log.Debug("RESPONSE: %v\n", response) if err != nil { this.writeError("Internal error: "+err.Error(), id, rpc.INTERNAL_ERROR, session) return