• Roberto Bayardo's avatar
    core, core/types: plain Message struct (#25977) · 67ac5f0a
    Roberto Bayardo authored
    Here, the core.Message interface turns into a plain struct and
    types.Message gets removed.
    
    This is a breaking change to packages core and core/types. While we do
    not promise API stability for package core, we do for core/types. An
    exception can be made for types.Message, since it doesn't have any
    purpose apart from invoking the state transition in package core.
    types.Message was also marked deprecated by the same commit it
    got added in, 4dca5d4d (November 2016).
    
    The core.Message interface was added in December 2014, in commit
    db494170, for the purpose of 'testing' state transitions. It's the
    same change that made transaction struct fields private. Before that,
    the state transition used *types.Transaction directly.
    
    Over time, multiple implementations of the interface accrued across
    different packages, since constructing a Message is required whenever
    one wants to invoke the state transition. These implementations all
    looked very similar, a struct with private fields exposing the fields
    as accessor methods.
    
    By changing Message into a struct with public fields we can remove all
    these useless interface implementations. It will also hopefully
    simplify future changes to the type with less updates to apply across
    all of go-ethereum when a field is added to Message.
    
    ---------
    Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
    67ac5f0a
Name
Last commit
Last update
.github Loading commit data...
accounts Loading commit data...
beacon/engine Loading commit data...
build Loading commit data...
cmd Loading commit data...
common Loading commit data...
consensus Loading commit data...
console Loading commit data...
contracts/checkpointoracle Loading commit data...
core Loading commit data...
crypto Loading commit data...
docs Loading commit data...
eth Loading commit data...
ethclient Loading commit data...
ethdb Loading commit data...
ethstats Loading commit data...
event Loading commit data...
graphql Loading commit data...
internal Loading commit data...
les Loading commit data...
light Loading commit data...
log Loading commit data...
metrics Loading commit data...
miner Loading commit data...
node Loading commit data...
p2p Loading commit data...
params Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
signer Loading commit data...
swarm Loading commit data...
tests Loading commit data...
trie Loading commit data...
.dockerignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.golangci.yml Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Dockerfile Loading commit data...
Dockerfile.alltools Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
appveyor.yml Loading commit data...
circle.yml Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...
interfaces.go Loading commit data...
oss-fuzz.sh Loading commit data...