From 1a4d9a0f354bb045e68add42ac076bd669497aae Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Fri, 23 Jul 2021 19:16:58 +0700 Subject: [PATCH] tx_hash_cache_broken (#2432) --- core/types/access_list_tx.go | 2 +- core/types/dynamic_fee_tx.go | 2 +- core/types/legacy_tx.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/types/access_list_tx.go b/core/types/access_list_tx.go index feadab579..0dd411854 100644 --- a/core/types/access_list_tx.go +++ b/core/types/access_list_tx.go @@ -580,7 +580,7 @@ func (tx *AccessListTx) FakeSign(address common.Address) (Transaction, error) { } // Hash computes the hash (but not for signatures!) -func (tx AccessListTx) Hash() common.Hash { +func (tx *AccessListTx) Hash() common.Hash { if hash := tx.hash.Load(); hash != nil { return *hash.(*common.Hash) } diff --git a/core/types/dynamic_fee_tx.go b/core/types/dynamic_fee_tx.go index 108dfc765..4b040e7e8 100644 --- a/core/types/dynamic_fee_tx.go +++ b/core/types/dynamic_fee_tx.go @@ -484,7 +484,7 @@ func (tx DynamicFeeTransaction) AsMessage(s Signer, baseFee *big.Int) (Message, } // Hash computes the hash (but not for signatures!) -func (tx DynamicFeeTransaction) Hash() common.Hash { +func (tx *DynamicFeeTransaction) Hash() common.Hash { if hash := tx.hash.Load(); hash != nil { return *hash.(*common.Hash) } diff --git a/core/types/legacy_tx.go b/core/types/legacy_tx.go index be6b4c72c..9cb478fe0 100644 --- a/core/types/legacy_tx.go +++ b/core/types/legacy_tx.go @@ -468,7 +468,7 @@ func (tx *LegacyTx) FakeSign(address common.Address) (Transaction, error) { } // Hash computes the hash (but not for signatures!) -func (tx LegacyTx) Hash() common.Hash { +func (tx *LegacyTx) Hash() common.Hash { if hash := tx.hash.Load(); hash != nil { return *hash.(*common.Hash) }