aboutsummaryrefslogtreecommitdiffstats
path: root/ethpipe/js_pipe.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-31 17:59:17 +0800
committerobscuren <geffobscura@gmail.com>2014-10-31 17:59:17 +0800
commit3ee0461cb5b6e4a5e2d287180afbdb681805a662 (patch)
treef245667a9e3f5f0ff23bb1c89f4f7cc783f4949c /ethpipe/js_pipe.go
parent8e0a39f33f9d24ebeca9cc88edf24cc6294552d7 (diff)
downloaddexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.gz
dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.zst
dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.zip
Moved ethchain to chain
Diffstat (limited to 'ethpipe/js_pipe.go')
-rw-r--r--ethpipe/js_pipe.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/ethpipe/js_pipe.go b/ethpipe/js_pipe.go
index 4b4369768..ee4637d8f 100644
--- a/ethpipe/js_pipe.go
+++ b/ethpipe/js_pipe.go
@@ -5,7 +5,7 @@ import (
"encoding/json"
"sync/atomic"
- "github.com/ethereum/go-ethereum/ethchain"
+ "github.com/ethereum/go-ethereum/chain"
"github.com/ethereum/go-ethereum/ethcrypto"
"github.com/ethereum/go-ethereum/ethstate"
"github.com/ethereum/go-ethereum/ethutil"
@@ -15,7 +15,7 @@ type JSPipe struct {
*Pipe
}
-func NewJSPipe(eth ethchain.EthManager) *JSPipe {
+func NewJSPipe(eth chain.EthManager) *JSPipe {
return &JSPipe{New(eth)}
}
@@ -63,7 +63,7 @@ func (self *JSPipe) PeerCount() int {
func (self *JSPipe) Peers() []JSPeer {
var peers []JSPeer
for peer := self.obj.Peers().Front(); peer != nil; peer = peer.Next() {
- p := peer.Value.(ethchain.Peer)
+ p := peer.Value.(chain.Peer)
// we only want connected peers
if atomic.LoadInt32(p.Connected()) != 0 {
peers = append(peers, *NewJSPeer(p))
@@ -209,7 +209,7 @@ func (self *JSPipe) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
gas = ethutil.Big(gasStr)
gasPrice = ethutil.Big(gasPriceStr)
data []byte
- tx *ethchain.Transaction
+ tx *chain.Transaction
)
if ethutil.IsHex(codeStr) {
@@ -219,9 +219,9 @@ func (self *JSPipe) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
}
if contractCreation {
- tx = ethchain.NewContractCreationTx(value, gas, gasPrice, data)
+ tx = chain.NewContractCreationTx(value, gas, gasPrice, data)
} else {
- tx = ethchain.NewTransactionMessage(hash, value, gas, gasPrice, data)
+ tx = chain.NewTransactionMessage(hash, value, gas, gasPrice, data)
}
acc := self.obj.StateManager().TransState().GetOrNewStateObject(keyPair.Address())
@@ -240,7 +240,7 @@ func (self *JSPipe) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
}
func (self *JSPipe) PushTx(txStr string) (*JSReceipt, error) {
- tx := ethchain.NewTransactionFromBytes(ethutil.Hex2Bytes(txStr))
+ tx := chain.NewTransactionFromBytes(ethutil.Hex2Bytes(txStr))
self.obj.TxPool().QueueTransaction(tx)
return NewJSReciept(tx.CreatesContract(), tx.CreationAddress(self.World().State()), tx.Hash(), tx.Sender()), nil
}