core, eth: split eth package, implement snap protocol (#21482)
This commit splits the eth package, separating the handling of eth and snap protocols. It also includes the capability to run snap sync (https://github.com/ethereum/devp2p/blob/master/caps/snap.md) , but does not enable it by default. Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
@ -659,12 +659,8 @@ func (bc *BlockChain) CurrentBlock() *types.Block {
|
||||
return bc.currentBlock.Load().(*types.Block)
|
||||
}
|
||||
|
||||
// Snapshot returns the blockchain snapshot tree. This method is mainly used for
|
||||
// testing, to make it possible to verify the snapshot after execution.
|
||||
//
|
||||
// Warning: There are no guarantees about the safety of using the returned 'snap' if the
|
||||
// blockchain is simultaneously importing blocks, so take care.
|
||||
func (bc *BlockChain) Snapshot() *snapshot.Tree {
|
||||
// Snapshots returns the blockchain snapshot tree.
|
||||
func (bc *BlockChain) Snapshots() *snapshot.Tree {
|
||||
return bc.snaps
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user