diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-06 17:22:40 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-06 17:22:40 +0800 |
commit | 23ad2f02c0992c212d7d179991560eb44f1b1f78 (patch) | |
tree | 534c2139cb72e37852f5fc20be15ccd5367e7a32 /core | |
parent | 580d09084d85c3c99a1f69fd4fc6ce9079e30065 (diff) | |
download | go-tangerine-23ad2f02c0992c212d7d179991560eb44f1b1f78.tar.gz go-tangerine-23ad2f02c0992c212d7d179991560eb44f1b1f78.tar.zst go-tangerine-23ad2f02c0992c212d7d179991560eb44f1b1f78.zip |
debug comments & pow handling
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index 1152e3fa2..75d2f6bad 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -66,7 +66,6 @@ func CalcGasLimit(parent, block *types.Block) *big.Int { } // ((1024-1) * parent.gasLimit + (gasUsed * 6 / 5)) / 1024 - previous := new(big.Int).Mul(big.NewInt(1024-1), parent.GasLimit()) current := new(big.Rat).Mul(new(big.Rat).SetInt(parent.GasUsed()), big.NewRat(6, 5)) curInt := new(big.Int).Div(current.Num(), current.Denom()) @@ -291,7 +290,6 @@ func (self *ChainManager) GetBlockHashesFromHash(hash []byte, max uint64) (chain if block == nil { return } - // XXX Could be optimised by using a different database which only holds hashes (i.e., linked list) for i := uint64(0); i < max; i++ { parentHash := block.Header().ParentHash @@ -396,12 +394,9 @@ func (bc *ChainManager) Stop() { } func (self *ChainManager) InsertChain(chain types.Blocks) error { - println("insert chain start") self.tsmu.Lock() defer self.tsmu.Unlock() - defer println("insert chain end") - for _, block := range chain { // Call in to the block processor and check for errors. It's likely that if one block fails // all others will fail too (unless a known block is returned). |