From 82405501872385b240012070bad2f0eda643d423 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 3 Dec 2014 14:05:19 +0100 Subject: updated to types --- xeth/hexface.go | 2 +- xeth/pipe.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'xeth') diff --git a/xeth/hexface.go b/xeth/hexface.go index 9b7aa6b9c..6360c7675 100644 --- a/xeth/hexface.go +++ b/xeth/hexface.go @@ -215,7 +215,7 @@ func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr if err != nil { return "", err } - if chain.IsContractAddr(to) { + if types.IsContractAddr(to) { return ethutil.Bytes2Hex(tx.CreationAddress(nil)), nil } diff --git a/xeth/pipe.go b/xeth/pipe.go index 9cc163a81..c96c6efc0 100644 --- a/xeth/pipe.go +++ b/xeth/pipe.go @@ -93,7 +93,7 @@ func (self *XEth) Exists(addr []byte) bool { return self.World().Get(addr) != nil } -func (self *XEth) TransactString(key *crypto.KeyPair, rec string, value, gas, price *ethutil.Value, data []byte) (*chain.Transaction, error) { +func (self *XEth) TransactString(key *crypto.KeyPair, rec string, value, gas, price *ethutil.Value, data []byte) (*types.Transaction, error) { // Check if an address is stored by this address var hash []byte addr := self.World().Config().Get("NameReg").StorageString(rec).Bytes() @@ -108,10 +108,10 @@ func (self *XEth) TransactString(key *crypto.KeyPair, rec string, value, gas, pr return self.Transact(key, hash, value, gas, price, data) } -func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *ethutil.Value, data []byte) (*chain.Transaction, error) { +func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *ethutil.Value, data []byte) (*types.Transaction, error) { var hash []byte var contractCreation bool - if chain.IsContractAddr(to) { + if types.IsContractAddr(to) { contractCreation = true } else { // Check if an address is stored by this address @@ -125,9 +125,9 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et var tx *types.Transaction if contractCreation { - tx = chain.NewContractCreationTx(value.BigInt(), gas.BigInt(), price.BigInt(), data) + tx = types.NewContractCreationTx(value.BigInt(), gas.BigInt(), price.BigInt(), data) } else { - tx = chain.NewTransactionMessage(hash, value.BigInt(), gas.BigInt(), price.BigInt(), data) + tx = types.NewTransactionMessage(hash, value.BigInt(), gas.BigInt(), price.BigInt(), data) } state := self.blockManager.TransState() -- cgit