mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
core/types: authorities to setcodeauthorities
This commit is contained in:
parent
8c984338b0
commit
ffa02b82e0
3 changed files with 4 additions and 4 deletions
|
|
@ -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{}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue