core/types: authorities to setcodeauthorities

This commit is contained in:
lightclient 2025-02-07 13:23:46 -07:00
parent 8c984338b0
commit ffa02b82e0
No known key found for this signature in database
GPG key ID: 657913021EF45A6A
3 changed files with 4 additions and 4 deletions

View file

@ -1755,7 +1755,7 @@ func (t *lookup) TxsBelowTip(threshold *big.Int) types.Transactions {
// addAuthorities tracks the supplied tx in relation to each authority it
// specifies.
func (t *lookup) addAuthorities(tx *types.Transaction) {
for _, addr := range tx.Authorities() {
for _, addr := range tx.SetCodeAuthorities() {
list, ok := t.auths[addr]
if !ok {
list = []common.Hash{}

View file

@ -280,7 +280,7 @@ func ValidateTransactionWithState(tx *types.Transaction, signer types.Signer, op
// Verify no authorizations will invalidate existing transactions known to
// the pool.
if opts.KnownConflicts != nil {
if conflicts := opts.KnownConflicts(from, tx.Authorities()); len(conflicts) > 0 {
if conflicts := opts.KnownConflicts(from, tx.SetCodeAuthorities()); len(conflicts) > 0 {
return fmt.Errorf("%w: authorization conflicts with other known tx", ErrAuthorityReserved)
}
}

View file

@ -483,8 +483,8 @@ func (tx *Transaction) SetCodeAuthorizations() []SetCodeAuthorization {
return setcodetx.AuthList
}
// Authorities returns a list of each authorization's corresponding authority.
func (tx *Transaction) Authorities() []common.Address {
// SetCodeAuthorities returns a list of each authorization's corresponding authority.
func (tx *Transaction) SetCodeAuthorities() []common.Address {
setcodetx, ok := tx.inner.(*SetCodeTx)
if !ok {
return nil