Skip to content

Commit

Permalink
enable rpc personal
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhson1085 committed Oct 3, 2019
1 parent b43c3e5 commit 565329e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docker/tomochain/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if [[ ! -z $NETWORK_ID ]]; then
;;
89 )
genesisPath="testnet.json"
params="$params --tomo-testnet --gcmode archive --rpcapi db,eth,net,web3,personal,debug"
params="$params --tomo-testnet --gcmode archive --rpcapi db,eth,net,web3,debug"
;;
90 )
genesisPath="devnet.json"
Expand Down Expand Up @@ -158,7 +158,7 @@ fi

# debug mode
if [[ ! -z $DEBUG_MODE ]]; then
params="$params --gcmode archive --rpcapi db,eth,net,web3,personal,debug"
params="$params --gcmode archive --rpcapi db,eth,net,web3,debug"
fi

# maxpeers
Expand Down
10 changes: 0 additions & 10 deletions rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,8 @@ func (s *Server) serveRequest(codec ServerCodec, singleShot bool, options CodecO
// If a single shot request is executing, run and return immediately
if singleShot {
if batch {
for _, req := range reqs {
if req.callb != nil && req.callb.method.Name == "SendTransaction" {
codec.Write(codec.CreateErrorResponse(&req.id, &invalidRequestError{message: "Only support send transaction with ipc"}))
return nil
}
}
s.execBatch(ctx, codec, reqs)
} else {
if reqs[0].callb != nil && reqs[0].callb.method.Name == "SendTransaction" {
codec.Write(codec.CreateErrorResponse(&reqs[0].id, &invalidRequestError{message: "Only support send transaction with ipc"}))
return nil
}
s.exec(ctx, codec, reqs[0])
}
return nil
Expand Down

0 comments on commit 565329e

Please sign in to comment.