fixing imports
pull/2285/head
Ganesha Upadhyaya 5 years ago committed by GitHub
parent 6e4cd29bb8
commit 8a657a30ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      core/rawdb/accessors_indexes.go

@ -17,6 +17,8 @@
package rawdb
import (
"bytes"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/rlp"
@ -95,7 +97,7 @@ func ReadTransaction(db DatabaseReader, hash common.Hash) (*types.Transaction, c
return nil, common.Hash{}, 0, 0
}
tx := body.TransactionAt(int(txIndex))
if tx == nil {
if tx == nil || bytes.Compare(hash.Bytes(), tx.Hash().Bytes()) != 0 {
utils.Logger().Error().
Uint64("number", blockNumber).
Str("hash", blockHash.Hex()).
@ -123,7 +125,7 @@ func ReadStakingTransaction(db DatabaseReader, hash common.Hash) (*staking.Staki
return nil, common.Hash{}, 0, 0
}
tx := body.StakingTransactionAt(int(txIndex))
if tx == nil {
if tx == nil || bytes.Compare(hash.Bytes(), tx.Hash().Bytes()) != 0 {
utils.Logger().Error().
Uint64("number", blockNumber).
Str("hash", blockHash.Hex()).

Loading…
Cancel
Save