use own total difficulty to limit best peer
- update blockpool td by subscribing to ChainHeadEvent - if ahead of best peer, demote it - addPeer now take own td as current td - removePeer now take own td as current td - add relevant tests to peers_test - eth: backend now calls blockpool with eth.eventMux and chainManager.Td
Showing
- blockpool/blockpool.go 44 additions, 2 deletionsblockpool/blockpool.go
- blockpool/blockpool_util_test.go 4 additions, 1 deletionblockpool/blockpool_util_test.go
- blockpool/config_test.go 3 additions, 2 deletionsblockpool/config_test.go
- blockpool/peers.go 6 additions, 9 deletionsblockpool/peers.go
- blockpool/peers_test.go 25 additions, 1 deletionblockpool/peers_test.go
- eth/backend.go 2 additions, 1 deletioneth/backend.go
- eth/protocol_test.go 3 additions, 10 deletionseth/protocol_test.go
Loading
Please register or sign in to comment