mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
core: panic if authorizations length doesn't match authorities
This commit is contained in:
parent
d7f29ad2e6
commit
cc65a4ad32
1 changed files with 4 additions and 0 deletions
|
|
@ -520,6 +520,10 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
|
|||
|
||||
// Apply EIP-7702 authorizations.
|
||||
if msg.SetCodeAuthorizations != nil {
|
||||
if len(msg.SetCodeAuthorizations) != len(msg.Authorities) {
|
||||
// This is an invariant of Message that cannot be invalidated.
|
||||
panic("Length of authorizations does match authorities")
|
||||
}
|
||||
for i, auth := range msg.SetCodeAuthorizations {
|
||||
addr := msg.Authorities[i]
|
||||
if addr == nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue