mirror of https://github.com/status-im/op-geth.git
Removed the last block of the block chain
Added CurrentBlock to block manager
This commit is contained in:
parent
42e8930b37
commit
d753eb77ec
|
@ -3,7 +3,7 @@ Ethereum
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/ethereum/go-ethereum.png?branch=master)](https://travis-ci.org/ethereum/go-ethereum)
|
[![Build Status](https://travis-ci.org/ethereum/go-ethereum.png?branch=master)](https://travis-ci.org/ethereum/go-ethereum)
|
||||||
|
|
||||||
Ethereum Go (c) [0255c7881](https://github.com/ethereum/go-ethereum#copy)
|
Ethereum Go developer client (c) [0255c7881](https://github.com/ethereum/go-ethereum#copy)
|
||||||
|
|
||||||
A fair warning; Ethereum is not yet to be used in production. There's no
|
A fair warning; Ethereum is not yet to be used in production. There's no
|
||||||
test-net and you aren't mining real blocks (just one which is the genesis block).
|
test-net and you aren't mining real blocks (just one which is the genesis block).
|
||||||
|
|
|
@ -122,7 +122,7 @@ func (i *Console) ParseInput(input string) bool {
|
||||||
fmt.Printf("%q\n", d)
|
fmt.Printf("%q\n", d)
|
||||||
case "getaddr":
|
case "getaddr":
|
||||||
encoded, _ := hex.DecodeString(tokens[1])
|
encoded, _ := hex.DecodeString(tokens[1])
|
||||||
d := i.ethereum.BlockManager.BlockChain().LastBlock.State().Get(string(encoded))
|
d := i.ethereum.BlockManager.CurrentBlock.State().Get(string(encoded))
|
||||||
if d != "" {
|
if d != "" {
|
||||||
decoder := ethutil.NewRlpDecoder([]byte(d))
|
decoder := ethutil.NewRlpDecoder([]byte(d))
|
||||||
fmt.Println(decoder)
|
fmt.Println(decoder)
|
||||||
|
|
|
@ -95,7 +95,7 @@ func main() {
|
||||||
time.Sleep(blockTime * time.Second)
|
time.Sleep(blockTime * time.Second)
|
||||||
|
|
||||||
block := ethchain.CreateBlock(
|
block := ethchain.CreateBlock(
|
||||||
ethereum.BlockManager.BlockChain().LastBlock.State().Root,
|
ethereum.BlockManager.CurrentBlock.State().Root,
|
||||||
ethereum.BlockManager.LastBlockHash,
|
ethereum.BlockManager.LastBlockHash,
|
||||||
"123",
|
"123",
|
||||||
big.NewInt(1),
|
big.NewInt(1),
|
||||||
|
|
Loading…
Reference in New Issue