consensus/clique, core: API cleanup (#23100)
This removes some code: - The clique engine calculated the snapshot twice when verifying headers/blocks. - The method GetBlockHashesFromHash in Header/Block/Lightchain was only used by tests. It is now removed from the API. - The method GetTdByHash internally looked up the number before calling GetTd(hash, num). In many cases, callers already had the number, and used this method just because it has a shorter name. I have removed the method to make the API surface smaller.
Showing
- consensus/clique/clique.go 2 additions, 8 deletionsconsensus/clique/clique.go
- core/blockchain.go 0 additions, 12 deletionscore/blockchain.go
- core/blockchain_test.go 16 additions, 10 deletionscore/blockchain_test.go
- core/headerchain.go 0 additions, 33 deletionscore/headerchain.go
- eth/api_backend.go 4 additions, 1 deletioneth/api_backend.go
- eth/protocols/eth/handler_test.go 7 additions, 1 deletioneth/protocols/eth/handler_test.go
- eth/sync.go 2 additions, 2 deletionseth/sync.go
- light/lightchain.go 0 additions, 12 deletionslight/lightchain.go
- light/lightchain_test.go 7 additions, 5 deletionslight/lightchain_test.go
Loading
Please register or sign in to comment