aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/ui/library.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethereal/ui/library.go')
-rw-r--r--ethereal/ui/library.go8
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())}
}