mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
Remove unused Transaction.Size (#6545)
This commit is contained in:
parent
919fc390be
commit
19af2009dc
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user