aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-05-18 23:41:56 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-05-18 23:41:56 +0800
commit54b5c8273db33ebc2bee762b92fa4a6c24e6ad94 (patch)
tree7a654c1b3fac7181fde2e1f08ede229033e0f4ed /xeth
parent62d76b8e1f0ebfe213c50006bec7dc1b5473029a (diff)
downloaddexon-54b5c8273db33ebc2bee762b92fa4a6c24e6ad94.tar
dexon-54b5c8273db33ebc2bee762b92fa4a6c24e6ad94.tar.gz
dexon-54b5c8273db33ebc2bee762b92fa4a6c24e6ad94.tar.bz2
dexon-54b5c8273db33ebc2bee762b92fa4a6c24e6ad94.tar.lz
dexon-54b5c8273db33ebc2bee762b92fa4a6c24e6ad94.tar.xz
dexon-54b5c8273db33ebc2bee762b92fa4a6c24e6ad94.tar.zst
dexon-54b5c8273db33ebc2bee762b92fa4a6c24e6ad94.zip
XEth comment clarification
Diffstat (limited to 'xeth')
-rw-r--r--xeth/xeth.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 88cd30afc..2d01bc681 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -304,6 +304,8 @@ func (self *XEth) EthBlockByHash(strHash string) *types.Block {
}
func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blhash common.Hash, blnum *big.Int, txi uint64) {
+ // Due to increasing return params and need to determine if this is from transaction pool or
+ // some chain, this probably needs to be refactored for more expressiveness
data, _ := self.backend.ExtraDb().Get(common.FromHex(hash))
if len(data) != 0 {
tx = types.NewTransactionFromBytes(data)
@@ -357,7 +359,7 @@ func (self *XEth) Block(v interface{}) *Block {
return self.BlockByNumber(int64(n))
} else if str, ok := v.(string); ok {
return self.BlockByHash(str)
- } else if f, ok := v.(float64); ok { // Don't ask ...
+ } else if f, ok := v.(float64); ok { // JSON numbers are represented as float64
return self.BlockByNumber(int64(f))
}
@@ -778,7 +780,7 @@ func (self *XEth) PushTx(encodedTx string) (string, error) {
}
func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr string) (string, string, error) {
- statedb := self.State().State().Copy() //self.eth.ChainManager().TransState()
+ statedb := self.State().State().Copy()
var from *state.StateObject
if len(fromStr) == 0 {
accounts, err := self.backend.AccountManager().Accounts()
@@ -869,6 +871,7 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS
contractCreation bool
)
+ // 2015-05-18 Is this still needed?
// TODO if no_private_key then
//if _, exists := p.register[args.From]; exists {
// p.register[args.From] = append(p.register[args.From], args)