diff options
author | obscuren <geffobscura@gmail.com> | 2014-01-24 03:16:52 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-01-24 03:16:52 +0800 |
commit | 477e8a7a73820ece05bbb990607a1919d3788960 (patch) | |
tree | c13d1d7f709f0934b54ef10377e671446d165db7 /dev_console.go | |
parent | 3616080db46931202003157bacf10748008bebc0 (diff) | |
download | go-tangerine-477e8a7a73820ece05bbb990607a1919d3788960.tar go-tangerine-477e8a7a73820ece05bbb990607a1919d3788960.tar.gz go-tangerine-477e8a7a73820ece05bbb990607a1919d3788960.tar.bz2 go-tangerine-477e8a7a73820ece05bbb990607a1919d3788960.tar.lz go-tangerine-477e8a7a73820ece05bbb990607a1919d3788960.tar.xz go-tangerine-477e8a7a73820ece05bbb990607a1919d3788960.tar.zst go-tangerine-477e8a7a73820ece05bbb990607a1919d3788960.zip |
Rearrange packages
Diffstat (limited to 'dev_console.go')
-rw-r--r-- | dev_console.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/dev_console.go b/dev_console.go index d14f019e5..b3e0d73f9 100644 --- a/dev_console.go +++ b/dev_console.go @@ -5,6 +5,8 @@ import ( "encoding/hex" "errors" "fmt" + "github.com/ethereum/eth-go" + "github.com/ethereum/ethchain-go" "github.com/ethereum/ethdb-go" "github.com/ethereum/ethutil-go" "os" @@ -12,16 +14,16 @@ import ( ) type Console struct { - db *ethdb.MemDatabase - trie *ethutil.Trie - server *Server + db *ethdb.MemDatabase + trie *ethutil.Trie + ethereum *eth.Ethereum } -func NewConsole(s *Server) *Console { +func NewConsole(s *eth.Ethereum) *Console { db, _ := ethdb.NewMemDatabase() trie := ethutil.NewTrie(db, "") - return &Console{db: db, trie: trie, server: s} + return &Console{db: db, trie: trie, ethereum: s} } func (i *Console) ValidateInput(action string, argumentLength int) error { @@ -101,7 +103,7 @@ func (i *Console) ParseInput(input string) bool { case "print": i.db.Print() case "dag": - fmt.Println(DaggerVerify(ethutil.Big(tokens[1]), // hash + fmt.Println(ethchain.DaggerVerify(ethutil.Big(tokens[1]), // hash ethutil.BigPow(2, 36), // diff ethutil.Big(tokens[2]))) // nonce case "decode": @@ -112,7 +114,7 @@ func (i *Console) ParseInput(input string) bool { case "tx": tx := ethutil.NewTransaction(tokens[1], ethutil.Big(tokens[2]), []string{""}) - i.server.txPool.QueueTransaction(tx) + i.ethereum.TxPool.QueueTransaction(tx) case "exit", "quit", "q": return false case "help": |