diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-26 07:47:04 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-26 07:47:04 +0800 |
commit | e16fd323e800297602a60b7a0e7b7897a55d2fa0 (patch) | |
tree | 1c27a3bc225af36d6b0b2117ba6b649cc3983110 /ethereal/ui/library.go | |
parent | d0438ac10ab55cd12c1ab5ec3aaf0030185bf131 (diff) | |
download | go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.gz go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.bz2 go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.lz go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.xz go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.zst go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.zip |
Leverage the new watch & address:changed functionality
Diffstat (limited to 'ethereal/ui/library.go')
-rw-r--r-- | ethereal/ui/library.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ethereal/ui/library.go b/ethereal/ui/library.go index 5ca2b4273..7f667f2c1 100644 --- a/ethereal/ui/library.go +++ b/ethereal/ui/library.go @@ -67,6 +67,10 @@ func (lib *EthLib) GetStateObject(address string) *Contract { return NewContract(stateObject) } +func (lib *EthLib) Watch(addr string) { + lib.stateManager.Watch(ethutil.FromHex(addr)) +} + func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, dataStr string) (string, error) { var hash []byte var contractCreation bool @@ -117,7 +121,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, dataStr st return ethutil.Hex(tx.Hash()), nil } -func (lib *EthLib) GetBlock(hexHash string) *Block { +func (lib *EthLib) GetBlock(hexHash string) *QBlock { hash, err := hex.DecodeString(hexHash) if err != nil { return nil @@ -125,5 +129,5 @@ func (lib *EthLib) GetBlock(hexHash string) *Block { block := lib.blockChain.GetBlock(hash) - return &Block{Number: int(block.BlockInfo().Number), Hash: ethutil.Hex(block.Hash())} + return &QBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Hex(block.Hash())} } |