diff --git a/core/types/access_list_tx.go b/core/types/access_list_tx.go index e1e914d51..3eef49f1a 100644 --- a/core/types/access_list_tx.go +++ b/core/types/access_list_tx.go @@ -98,16 +98,6 @@ func (tx AccessListTx) GetAccessList() AccessList { return tx.AccessList } -func (tx *AccessListTx) Size() common.StorageSize { - if size := tx.size.Load(); size != nil { - return size.(common.StorageSize) - } - c := tx.EncodingSize() - c++ // TxType - tx.size.Store(common.StorageSize(c)) - return common.StorageSize(c) -} - func (tx AccessListTx) Protected() bool { return true } diff --git a/core/types/dynamic_fee_tx.go b/core/types/dynamic_fee_tx.go index 2aa10fb9d..b6d05f8c0 100644 --- a/core/types/dynamic_fee_tx.go +++ b/core/types/dynamic_fee_tx.go @@ -106,15 +106,6 @@ func (tx DynamicFeeTransaction) GetAccessList() AccessList { return tx.AccessList } -func (tx *DynamicFeeTransaction) Size() common.StorageSize { - if size := tx.size.Load(); size != nil { - return size.(common.StorageSize) - } - c := tx.EncodingSize() - tx.size.Store(common.StorageSize(c)) - return common.StorageSize(c) -} - func (tx DynamicFeeTransaction) EncodingSize() int { payloadSize, _, _, _ := tx.payloadSize() envelopeSize := payloadSize diff --git a/core/types/legacy_tx.go b/core/types/legacy_tx.go index 50c6026f2..ef51afad7 100644 --- a/core/types/legacy_tx.go +++ b/core/types/legacy_tx.go @@ -187,15 +187,6 @@ func (tx LegacyTx) copy() *LegacyTx { return cpy } -func (tx *LegacyTx) Size() common.StorageSize { - if size := tx.size.Load(); size != nil { - return size.(common.StorageSize) - } - c := tx.EncodingSize() - tx.size.Store(common.StorageSize(c)) - return common.StorageSize(c) -} - func (tx LegacyTx) EncodingSize() int { payloadSize, _, _ := tx.payloadSize() return payloadSize diff --git a/core/types/starknet_tx.go b/core/types/starknet_tx.go index a5caf891b..a1390220c 100644 --- a/core/types/starknet_tx.go +++ b/core/types/starknet_tx.go @@ -206,10 +206,6 @@ func (tx StarknetTransaction) SigningHash(chainID *big.Int) common.Hash { }) } -func (tx StarknetTransaction) Size() common.StorageSize { - panic("implement me") -} - func (tx StarknetTransaction) GetAccessList() AccessList { panic("implement me") } diff --git a/core/types/transaction.go b/core/types/transaction.go index 678cde13f..4e36d36cd 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -70,7 +70,6 @@ type Transaction interface { FakeSign(address common.Address) (Transaction, error) Hash() common.Hash SigningHash(chainID *big.Int) common.Hash - Size() common.StorageSize GetData() []byte GetAccessList() AccessList Protected() bool @@ -97,7 +96,6 @@ type TransactionMisc struct { // caches hash atomic.Value //nolint:structcheck - size atomic.Value //nolint:structcheck from atomic.Value }