go-ethereum
go-ethereum copied to clipboard
eth: unify the eth receiver name (s, eth) -> e
Purpose
Currently, eth.Ethereum
have two named receiver s
and eth
. This don't follow golang code style.
s
receiver: https://github.com/ethereum/go-ethereum/blob/master/eth/backend.go#L309
eth
receiver: https://github.com/ethereum/go-ethereum/blob/master/eth/state_accessor.go#L177
So, this pr unify the receiver name
What is the logic for calling Ethereum
s
?
What is the logic for calling
Ethereum
s
?
I noticed that most of the receivers were originally called s
. Of course, they can be unified as eth
for more clarity.
But, backend.go is in the eth
package. if the receiver is also call eth
, maybe confused. eg:
eth.Etherbase()
eth.MakeProtocols()
developer can't recognize whether the function is a package method or struct method. And this will cause error invoke. Maybe receiver name callse
is more suitable
Maybe was s
for "service" ?