Added storage watch

This commit is contained in:
obscuren
2014-05-05 11:56:05 +02:00
parent 2582d719b2
commit dd45197bcd
5 changed files with 48 additions and 18 deletions

View File

@ -6,7 +6,6 @@ import (
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml"
"math/big"
)
type AppContainer interface {
@ -18,7 +17,7 @@ type AppContainer interface {
NewBlock(*ethchain.Block)
ObjectChanged(*ethchain.StateObject)
StorageChanged(*ethchain.StateObject, []byte, *big.Int)
StorageChanged(*ethchain.StorageState)
}
type ExtApplication struct {
@ -105,8 +104,8 @@ out:
case object := <-app.changeChan:
if stateObject, ok := object.Resource.(*ethchain.StateObject); ok {
app.container.ObjectChanged(stateObject)
} else if _, ok := object.Resource.(*big.Int); ok {
//
} else if storageObject, ok := object.Resource.(*ethchain.StorageState); ok {
app.container.StorageChanged(storageObject)
}
}
}