Conform to the new server model
This commit is contained in:
parent
8275059856
commit
f7fb5b902c
@ -158,11 +158,11 @@ func (i *Console) ParseInput(input string) bool {
|
|||||||
fmt.Println(value)
|
fmt.Println(value)
|
||||||
case "getaddr":
|
case "getaddr":
|
||||||
encoded, _ := hex.DecodeString(tokens[1])
|
encoded, _ := hex.DecodeString(tokens[1])
|
||||||
addr := i.ethereum.BlockManager.BlockChain().CurrentBlock.State().GetAccount(encoded)
|
addr := i.ethereum.BlockChain().CurrentBlock.State().GetAccount(encoded)
|
||||||
fmt.Println("addr:", addr)
|
fmt.Println("addr:", addr)
|
||||||
case "block":
|
case "block":
|
||||||
encoded, _ := hex.DecodeString(tokens[1])
|
encoded, _ := hex.DecodeString(tokens[1])
|
||||||
block := i.ethereum.BlockManager.BlockChain().GetBlock(encoded)
|
block := i.ethereum.BlockChain().GetBlock(encoded)
|
||||||
info := block.BlockInfo()
|
info := block.BlockInfo()
|
||||||
fmt.Printf("++++++++++ #%d ++++++++++\n%v\n", info.Number, block)
|
fmt.Printf("++++++++++ #%d ++++++++++\n%v\n", info.Number, block)
|
||||||
case "say":
|
case "say":
|
||||||
@ -182,7 +182,7 @@ func (i *Console) ParseInput(input string) bool {
|
|||||||
|
|
||||||
key := ethutil.Config.Db.GetKeys()[0]
|
key := ethutil.Config.Db.GetKeys()[0]
|
||||||
tx.Sign(key.PrivateKey)
|
tx.Sign(key.PrivateKey)
|
||||||
i.ethereum.TxPool.QueueTransaction(tx)
|
i.ethereum.TxPool().QueueTransaction(tx)
|
||||||
|
|
||||||
fmt.Printf("%x\n", tx.Hash())
|
fmt.Printf("%x\n", tx.Hash())
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ func (i *Console) ParseInput(input string) bool {
|
|||||||
key := ethutil.Config.Db.GetKeys()[0]
|
key := ethutil.Config.Db.GetKeys()[0]
|
||||||
contract.Sign(key.PrivateKey)
|
contract.Sign(key.PrivateKey)
|
||||||
|
|
||||||
i.ethereum.TxPool.QueueTransaction(contract)
|
i.ethereum.TxPool().QueueTransaction(contract)
|
||||||
|
|
||||||
fmt.Printf("%x\n", contract.Hash()[12:])
|
fmt.Printf("%x\n", contract.Hash()[12:])
|
||||||
case "exit", "quit", "q":
|
case "exit", "quit", "q":
|
||||||
|
Loading…
Reference in New Issue
Block a user