Renamed chain
=> core
This commit is contained in:
@ -21,8 +21,9 @@ import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"strconv"
|
||||
"github.com/ethereum/go-ethereum/chain/types"
|
||||
|
||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/ethutil"
|
||||
"github.com/ethereum/go-ethereum/logger"
|
||||
)
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/ethereum/go-ethereum/chain"
|
||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/ethutil"
|
||||
"github.com/ethereum/go-ethereum/state"
|
||||
"github.com/ethereum/go-ethereum/vm"
|
||||
@ -81,7 +81,7 @@ func (self *DebuggerWindow) SetData(data string) {
|
||||
func (self *DebuggerWindow) SetAsm(data []byte) {
|
||||
self.win.Root().Call("clearAsm")
|
||||
|
||||
dis := chain.Disassemble(data)
|
||||
dis := core.Disassemble(data)
|
||||
for _, str := range dis {
|
||||
self.win.Root().Call("setAsm", str)
|
||||
}
|
||||
|
@ -20,8 +20,8 @@ package main
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/ethereum/go-ethereum/chain"
|
||||
"github.com/ethereum/go-ethereum/chain/types"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/ethereum/go-ethereum/javascript"
|
||||
"github.com/ethereum/go-ethereum/state"
|
||||
@ -45,12 +45,12 @@ type AppContainer interface {
|
||||
|
||||
type ExtApplication struct {
|
||||
*xeth.JSXEth
|
||||
eth chain.EthManager
|
||||
eth core.EthManager
|
||||
|
||||
events event.Subscription
|
||||
watcherQuitChan chan bool
|
||||
|
||||
filters map[string]*chain.Filter
|
||||
filters map[string]*core.Filter
|
||||
|
||||
container AppContainer
|
||||
lib *UiLib
|
||||
@ -61,7 +61,7 @@ func NewExtApplication(container AppContainer, lib *UiLib) *ExtApplication {
|
||||
JSXEth: xeth.NewJSXEth(lib.eth),
|
||||
eth: lib.eth,
|
||||
watcherQuitChan: make(chan bool),
|
||||
filters: make(map[string]*chain.Filter),
|
||||
filters: make(map[string]*core.Filter),
|
||||
container: container,
|
||||
lib: lib,
|
||||
}
|
||||
@ -81,7 +81,7 @@ func (app *ExtApplication) run() {
|
||||
|
||||
// Subscribe to events
|
||||
mux := app.lib.eth.EventMux()
|
||||
app.events = mux.Subscribe(chain.NewBlockEvent{}, state.Messages(nil))
|
||||
app.events = mux.Subscribe(core.NewBlockEvent{}, state.Messages(nil))
|
||||
|
||||
// Call the main loop
|
||||
go app.mainLoop()
|
||||
@ -107,7 +107,7 @@ func (app *ExtApplication) stop() {
|
||||
func (app *ExtApplication) mainLoop() {
|
||||
for ev := range app.events.Chan() {
|
||||
switch ev := ev.(type) {
|
||||
case chain.NewBlockEvent:
|
||||
case core.NewBlockEvent:
|
||||
app.container.NewBlock(ev.Block)
|
||||
|
||||
case state.Messages:
|
||||
|
@ -31,8 +31,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum"
|
||||
"github.com/ethereum/go-ethereum/chain"
|
||||
"github.com/ethereum/go-ethereum/chain/types"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/ethutil"
|
||||
"github.com/ethereum/go-ethereum/logger"
|
||||
@ -413,9 +413,9 @@ func (gui *Gui) update() {
|
||||
events := gui.eth.EventMux().Subscribe(
|
||||
eth.ChainSyncEvent{},
|
||||
eth.PeerListEvent{},
|
||||
chain.NewBlockEvent{},
|
||||
chain.TxPreEvent{},
|
||||
chain.TxPostEvent{},
|
||||
core.NewBlockEvent{},
|
||||
core.TxPreEvent{},
|
||||
core.TxPostEvent{},
|
||||
)
|
||||
|
||||
// nameReg := gui.pipe.World().Config().Get("NameReg")
|
||||
@ -430,13 +430,13 @@ func (gui *Gui) update() {
|
||||
return
|
||||
}
|
||||
switch ev := ev.(type) {
|
||||
case chain.NewBlockEvent:
|
||||
case core.NewBlockEvent:
|
||||
gui.processBlock(ev.Block, false)
|
||||
if bytes.Compare(ev.Block.Coinbase, gui.address()) == 0 {
|
||||
gui.setWalletValue(gui.eth.BlockManager().CurrentState().GetAccount(gui.address()).Balance(), nil)
|
||||
}
|
||||
|
||||
case chain.TxPreEvent:
|
||||
case core.TxPreEvent:
|
||||
tx := ev.Tx
|
||||
object := state.GetAccount(gui.address())
|
||||
|
||||
@ -449,7 +449,7 @@ func (gui *Gui) update() {
|
||||
gui.setWalletValue(object.Balance(), unconfirmedFunds)
|
||||
gui.insertTransaction("pre", tx)
|
||||
|
||||
case chain.TxPostEvent:
|
||||
case core.TxPostEvent:
|
||||
tx := ev.Tx
|
||||
object := state.GetAccount(gui.address())
|
||||
|
||||
|
@ -26,7 +26,8 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"github.com/ethereum/go-ethereum/chain/types"
|
||||
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/ethutil"
|
||||
"github.com/ethereum/go-ethereum/javascript"
|
||||
"github.com/ethereum/go-ethereum/state"
|
||||
|
@ -20,7 +20,8 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"github.com/ethereum/go-ethereum/chain/types"
|
||||
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/ethutil"
|
||||
"github.com/ethereum/go-ethereum/state"
|
||||
"github.com/ethereum/go-ethereum/xeth"
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/ethereum/go-ethereum"
|
||||
"github.com/ethereum/go-ethereum/chain"
|
||||
"github.com/ethereum/go-ethereum/chain/types"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/ethutil"
|
||||
"github.com/ethereum/go-ethereum/javascript"
|
||||
@ -231,7 +231,7 @@ func (self *UiLib) NewFilter(object map[string]interface{}) (id int) {
|
||||
}
|
||||
|
||||
func (self *UiLib) NewFilterString(typ string) (id int) {
|
||||
filter := chain.NewFilter(self.eth)
|
||||
filter := core.NewFilter(self.eth)
|
||||
filter.BlockCallback = func(block *types.Block) {
|
||||
if self.win != nil && self.win.Root() != nil {
|
||||
self.win.Root().Call("invokeFilterCallback", "{}", id)
|
||||
|
@ -3,8 +3,8 @@ package utils
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/ethereum/go-ethereum/chain"
|
||||
"github.com/ethereum/go-ethereum/chain/types"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/state"
|
||||
"github.com/ethereum/go-ethereum/vm"
|
||||
)
|
||||
@ -48,10 +48,10 @@ func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error {
|
||||
return vm.Transfer(from, to, amount)
|
||||
}
|
||||
|
||||
func (self *VMEnv) vm(addr, data []byte, gas, price, value *big.Int) *chain.Execution {
|
||||
func (self *VMEnv) vm(addr, data []byte, gas, price, value *big.Int) *core.Execution {
|
||||
evm := vm.New(self, vm.DebugVmTy)
|
||||
|
||||
return chain.NewExecution(evm, addr, data, gas, price, value)
|
||||
return core.NewExecution(evm, addr, data, gas, price, value)
|
||||
}
|
||||
|
||||
func (self *VMEnv) Call(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) {
|
||||
|
Reference in New Issue
Block a user