Skip to content
Snippets Groups Projects
Commit f8129b5c authored by Casey Kuhlman's avatar Casey Kuhlman
Browse files

Merge pull request #54 from eris-ltd/develop

version bump
parents 9c0f1281 ab572fa1
No related branches found
No related tags found
No related merge requests found
...@@ -2,8 +2,8 @@ machine: ...@@ -2,8 +2,8 @@ machine:
environment: environment:
GOPATH: /home/ubuntu/.go_workspace GOPATH: /home/ubuntu/.go_workspace
REPO: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} REPO: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
INTEGRATION_TESTS_BRANCH: develop #INTEGRATION_TESTS_BRANCH: develop
INTEGRATION_TESTS_PATH: $HOME/integration-tests #INTEGRATION_TESTS_PATH: $HOME/integration-tests
DOCKER_VERSION: 1.8.2 DOCKER_VERSION: 1.8.2
DOCKER_MACHINE_VERSION: 0.5.4 DOCKER_MACHINE_VERSION: 0.5.4
post: post:
...@@ -19,7 +19,7 @@ dependencies: ...@@ -19,7 +19,7 @@ dependencies:
- sudo service docker start - sudo service docker start
- "sudo apt-get update && sudo apt-get install -y libgmp3-dev" - "sudo apt-get update && sudo apt-get install -y libgmp3-dev"
- sudo curl -sSL -o /usr/bin/docker-machine https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine_linux-amd64; sudo chmod 0755 /usr/bin/docker-machine - sudo curl -sSL -o /usr/bin/docker-machine https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine_linux-amd64; sudo chmod 0755 /usr/bin/docker-machine
- git clone https://github.com/eris-ltd/integration-tests $INTEGRATION_TESTS_PATH # - git clone https://github.com/eris-ltd/integration-tests $INTEGRATION_TESTS_PATH
- "cd ./cmd/erisdb && go get -d && go build" - "cd ./cmd/erisdb && go get -d && go build"
- "mv ~/eris-db/cmd/erisdb/erisdb ~/bin" - "mv ~/eris-db/cmd/erisdb/erisdb ~/bin"
- chmod +x ~/bin/erisdb - chmod +x ~/bin/erisdb
...@@ -27,7 +27,7 @@ dependencies: ...@@ -27,7 +27,7 @@ dependencies:
test: test:
override: override:
- go test -v ./... - go test -v ./...
- bash $INTEGRATION_TESTS_PATH/test.sh #- bash $INTEGRATION_TESTS_PATH/test.sh
deployment: deployment:
master: master:
......
package erisdb package erisdb
import ( import (
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/wire"
rpc "github.com/eris-ltd/eris-db/rpc"
"io" "io"
"io/ioutil" "io/ioutil"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/wire"
rpc "github.com/eris-ltd/eris-db/rpc"
) )
// Codec that uses tendermints 'binary' package for JSON. // Codec that uses tendermints 'binary' package for JSON.
......
...@@ -3,10 +3,13 @@ package erisdb ...@@ -3,10 +3,13 @@ package erisdb
import ( import (
"crypto/rand" "crypto/rand"
"encoding/hex" "encoding/hex"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/types" "strings"
ep "github.com/eris-ltd/eris-db/erisdb/pipe" ep "github.com/eris-ltd/eris-db/erisdb/pipe"
rpc "github.com/eris-ltd/eris-db/rpc" rpc "github.com/eris-ltd/eris-db/rpc"
"strings"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/types"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/wire"
) )
// TODO use the method name definition file. // TODO use the method name definition file.
...@@ -381,12 +384,14 @@ func (this *ErisDbMethods) CallCode(request *rpc.RPCRequest, requester interface ...@@ -381,12 +384,14 @@ func (this *ErisDbMethods) CallCode(request *rpc.RPCRequest, requester interface
} }
func (this *ErisDbMethods) BroadcastTx(request *rpc.RPCRequest, requester interface{}) (interface{}, int, error) { func (this *ErisDbMethods) BroadcastTx(request *rpc.RPCRequest, requester interface{}) (interface{}, int, error) {
param := &types.CallTx{} var err error
err := this.codec.DecodeBytes(param, request.Params) // Special because Tx is an interface
param := new(types.Tx)
wire.ReadJSONPtr(param, request.Params, &err)
if err != nil { if err != nil {
return nil, rpc.INVALID_PARAMS, err return nil, rpc.INVALID_PARAMS, err
} }
receipt, errC := this.pipe.Transactor().BroadcastTx(param) receipt, errC := this.pipe.Transactor().BroadcastTx(*param)
if errC != nil { if errC != nil {
return nil, rpc.INTERNAL_ERROR, errC return nil, rpc.INTERNAL_ERROR, errC
} }
......
...@@ -3,14 +3,18 @@ package erisdb ...@@ -3,14 +3,18 @@ package erisdb
import ( import (
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/gin-gonic/gin" "io/ioutil"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/types" "strconv"
"strings"
ep "github.com/eris-ltd/eris-db/erisdb/pipe" ep "github.com/eris-ltd/eris-db/erisdb/pipe"
rpc "github.com/eris-ltd/eris-db/rpc" rpc "github.com/eris-ltd/eris-db/rpc"
"github.com/eris-ltd/eris-db/server" "github.com/eris-ltd/eris-db/server"
"github.com/eris-ltd/eris-db/util" "github.com/eris-ltd/eris-db/util"
"strconv"
"strings" "github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/gin-gonic/gin"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/types"
"github.com/eris-ltd/eris-db/Godeps/_workspace/src/github.com/tendermint/tendermint/wire"
) )
// Provides a REST-like web-api. Implements server.Server // Provides a REST-like web-api. Implements server.Server
...@@ -372,12 +376,15 @@ func (this *RestServer) handlePeer(c *gin.Context) { ...@@ -372,12 +376,15 @@ func (this *RestServer) handlePeer(c *gin.Context) {
// ********************************* Transactions ********************************* // ********************************* Transactions *********************************
func (this *RestServer) handleBroadcastTx(c *gin.Context) { func (this *RestServer) handleBroadcastTx(c *gin.Context) {
param := &types.CallTx{} // Special because Tx is an interface
errD := this.codec.Decode(param, c.Request.Body) param := new(types.Tx)
if errD != nil { b, err := ioutil.ReadAll(c.Request.Body)
c.AbortWithError(500, errD) defer c.Request.Body.Close()
wire.ReadJSONPtr(param, b, &err)
if err != nil {
c.AbortWithError(500, err)
} }
receipt, err := this.pipe.Transactor().BroadcastTx(param) receipt, err := this.pipe.Transactor().BroadcastTx(*param)
if err != nil { if err != nil {
c.AbortWithError(500, err) c.AbortWithError(500, err)
} }
......
package version package version
import ( const Version = "0.11.1"
)
const Version = "0.11.0"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment