aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/hexface.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-18 23:58:22 +0800
committerobscuren <geffobscura@gmail.com>2014-11-18 23:58:22 +0800
commita1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b (patch)
treeaee891c8f02591e16377a6bf047c13f12d6d5123 /xeth/hexface.go
parent62cd9946ee16758a4e368cd0b5a0ba9fa4d94705 (diff)
downloaddexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.gz
dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.zst
dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.zip
Begin of moving objects to types package
* Block(s) * Transaction(s)
Diffstat (limited to 'xeth/hexface.go')
-rw-r--r--xeth/hexface.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/xeth/hexface.go b/xeth/hexface.go
index 5ef3eaf1a..5bf9845d4 100644
--- a/xeth/hexface.go
+++ b/xeth/hexface.go
@@ -6,6 +6,7 @@ import (
"sync/atomic"
"github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/state"
@@ -209,7 +210,7 @@ func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
gas = ethutil.Big(gasStr)
gasPrice = ethutil.Big(gasPriceStr)
data []byte
- tx *chain.Transaction
+ tx *types.Transaction
)
if ethutil.IsHex(codeStr) {
@@ -219,9 +220,9 @@ func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
}
if contractCreation {
- tx = chain.NewContractCreationTx(value, gas, gasPrice, data)
+ tx = types.NewContractCreationTx(value, gas, gasPrice, data)
} else {
- tx = chain.NewTransactionMessage(hash, value, gas, gasPrice, data)
+ tx = types.NewTransactionMessage(hash, value, gas, gasPrice, data)
}
acc := self.obj.BlockManager().TransState().GetOrNewStateObject(keyPair.Address())
@@ -240,7 +241,7 @@ func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
}
func (self *JSXEth) PushTx(txStr string) (*JSReceipt, error) {
- tx := chain.NewTransactionFromBytes(ethutil.Hex2Bytes(txStr))
+ tx := types.NewTransactionFromBytes(ethutil.Hex2Bytes(txStr))
self.obj.TxPool().QueueTransaction(tx)
return NewJSReciept(tx.CreatesContract(), tx.CreationAddress(self.World().State()), tx.Hash(), tx.Sender()), nil
}