diff options
author | Determinant <[email protected]> | 2020-09-16 22:54:37 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-09-16 22:54:37 -0400 |
commit | ed839907e592ad25e6119e145e7e05ca78b00fcd (patch) | |
tree | 1235df2fcf794c391afb33cc2dd80926469e2c7e /core/blockchain.go | |
parent | 5370b602abea0415f7609f19e3f44d5c9366e5bd (diff) |
...
Diffstat (limited to 'core/blockchain.go')
-rw-r--r-- | core/blockchain.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 82e3b6c..b3a7ffa 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2492,12 +2492,13 @@ func (bc *BlockChain) SubscribeBlockProcessingEvent(ch chan<- bool) event.Subscr } func (bc *BlockChain) ManualHead(hash common.Hash) error { - block := bc.GetBlockByHash(hash) - if block == nil { - return errors.New("block not found") - } - bc.chainmu.Lock() - defer bc.chainmu.Unlock() - bc.writeHeadBlock(block) - return nil + return bc.FastSyncCommitHead(hash) + //block := bc.GetBlockByHash(hash) + //if block == nil { + // return errors.New("block not found") + //} + //bc.chainmu.Lock() + //defer bc.chainmu.Unlock() + //bc.writeHeadBlock(block) + //return nil } |