diff options
author | zelig <viktor.tron@gmail.com> | 2014-07-31 00:03:20 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-07-31 00:03:20 +0800 |
commit | 9831619881c5264c2449ce1b906108d892b6e1e1 (patch) | |
tree | f8775b1196fe6b31081a553945377f40bdc8d550 /ethchain/block_chain.go | |
parent | 194c58858cd230a9a08b0eb14650720341a5580e (diff) | |
parent | 42d47ecfb09ac0b419db5722602d9b02e21f2457 (diff) | |
download | go-tangerine-9831619881c5264c2449ce1b906108d892b6e1e1.tar go-tangerine-9831619881c5264c2449ce1b906108d892b6e1e1.tar.gz go-tangerine-9831619881c5264c2449ce1b906108d892b6e1e1.tar.bz2 go-tangerine-9831619881c5264c2449ce1b906108d892b6e1e1.tar.lz go-tangerine-9831619881c5264c2449ce1b906108d892b6e1e1.tar.xz go-tangerine-9831619881c5264c2449ce1b906108d892b6e1e1.tar.zst go-tangerine-9831619881c5264c2449ce1b906108d892b6e1e1.zip |
merge upstream
Diffstat (limited to 'ethchain/block_chain.go')
-rw-r--r-- | ethchain/block_chain.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ethchain/block_chain.go b/ethchain/block_chain.go index f72a77706..250903798 100644 --- a/ethchain/block_chain.go +++ b/ethchain/block_chain.go @@ -2,11 +2,12 @@ package ethchain import ( "bytes" + "math" + "math/big" + "github.com/ethereum/eth-go/ethlog" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethwire" - "math" - "math/big" ) var chainlogger = ethlog.NewLogger("CHAIN") @@ -44,7 +45,7 @@ func (bc *BlockChain) NewBlock(coinbase []byte) *Block { hash := ZeroHash256 if bc.CurrentBlock != nil { - root = bc.CurrentBlock.state.trie.Root + root = bc.CurrentBlock.state.Trie.Root hash = bc.LastBlockHash lastBlockTime = bc.CurrentBlock.Time } @@ -280,7 +281,7 @@ func AddTestNetFunds(block *Block) { } { codedAddr := ethutil.Hex2Bytes(addr) account := block.state.GetAccount(codedAddr) - account.Amount = ethutil.Big("1606938044258990275541962092341162602522202993782792835301376") //ethutil.BigPow(2, 200) + account.Balance = ethutil.Big("1606938044258990275541962092341162602522202993782792835301376") //ethutil.BigPow(2, 200) block.state.UpdateStateObject(account) } } @@ -297,7 +298,7 @@ func (bc *BlockChain) setLastBlock() { } else { AddTestNetFunds(bc.genesisBlock) - bc.genesisBlock.state.trie.Sync() + bc.genesisBlock.state.Trie.Sync() // Prepare the genesis block bc.Add(bc.genesisBlock) |