aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-15 17:06:57 +0800
committerFelix Lange <fjl@twurst.com>2016-04-15 17:17:27 +0800
commit6fdd0893c3ebf57e5a9ba2af569c595c859ab902 (patch)
tree2df67265a0350b68b2f10ba2f7dcd292fef59ad0 /core/blockchain.go
parent68c755a238f1a204087c2843f01d48fc6039716f (diff)
downloaddexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.gz
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.bz2
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.lz
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.xz
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.zst
dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.zip
all: fix go vet warnings
Diffstat (limited to 'core/blockchain.go')
-rw-r--r--core/blockchain.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index e740eb861..ecf8297cb 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -993,7 +993,7 @@ func (self *BlockChain) reorg(oldBlock, newBlock *types.Block) error {
// first reduce whoever is higher bound
if oldBlock.NumberU64() > newBlock.NumberU64() {
// reduce old chain
- for oldBlock = oldBlock; oldBlock != nil && oldBlock.NumberU64() != newBlock.NumberU64(); oldBlock = self.GetBlock(oldBlock.ParentHash()) {
+ for ; oldBlock != nil && oldBlock.NumberU64() != newBlock.NumberU64(); oldBlock = self.GetBlock(oldBlock.ParentHash()) {
oldChain = append(oldChain, oldBlock)
deletedTxs = append(deletedTxs, oldBlock.Transactions()...)
@@ -1001,7 +1001,7 @@ func (self *BlockChain) reorg(oldBlock, newBlock *types.Block) error {
}
} else {
// reduce new chain and append new chain blocks for inserting later on
- for newBlock = newBlock; newBlock != nil && newBlock.NumberU64() != oldBlock.NumberU64(); newBlock = self.GetBlock(newBlock.ParentHash()) {
+ for ; newBlock != nil && newBlock.NumberU64() != oldBlock.NumberU64(); newBlock = self.GetBlock(newBlock.ParentHash()) {
newChain = append(newChain, newBlock)
}
}