mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 01:27: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
|
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 {
|
func (tx AccessListTx) Protected() bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -106,15 +106,6 @@ func (tx DynamicFeeTransaction) GetAccessList() AccessList {
|
|||||||
return tx.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 {
|
func (tx DynamicFeeTransaction) EncodingSize() int {
|
||||||
payloadSize, _, _, _ := tx.payloadSize()
|
payloadSize, _, _, _ := tx.payloadSize()
|
||||||
envelopeSize := payloadSize
|
envelopeSize := payloadSize
|
||||||
|
@ -187,15 +187,6 @@ func (tx LegacyTx) copy() *LegacyTx {
|
|||||||
return cpy
|
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 {
|
func (tx LegacyTx) EncodingSize() int {
|
||||||
payloadSize, _, _ := tx.payloadSize()
|
payloadSize, _, _ := tx.payloadSize()
|
||||||
return 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 {
|
func (tx StarknetTransaction) GetAccessList() AccessList {
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,6 @@ type Transaction interface {
|
|||||||
FakeSign(address common.Address) (Transaction, error)
|
FakeSign(address common.Address) (Transaction, error)
|
||||||
Hash() common.Hash
|
Hash() common.Hash
|
||||||
SigningHash(chainID *big.Int) common.Hash
|
SigningHash(chainID *big.Int) common.Hash
|
||||||
Size() common.StorageSize
|
|
||||||
GetData() []byte
|
GetData() []byte
|
||||||
GetAccessList() AccessList
|
GetAccessList() AccessList
|
||||||
Protected() bool
|
Protected() bool
|
||||||
@ -97,7 +96,6 @@ type TransactionMisc struct {
|
|||||||
|
|
||||||
// caches
|
// caches
|
||||||
hash atomic.Value //nolint:structcheck
|
hash atomic.Value //nolint:structcheck
|
||||||
size atomic.Value //nolint:structcheck
|
|
||||||
from atomic.Value
|
from atomic.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user