|
|
|
@ -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()). |
|
|
|
|