mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
fix(trace): use correct roots in trace of block with one transaction (#508)
fix: use correct roots in trace of block with one transaction
This commit is contained in:
parent
1d824f42bd
commit
9c1433b62a
3 changed files with 5 additions and 4 deletions
|
|
@ -58,7 +58,7 @@ type SkippedTransaction struct {
|
||||||
// BlockNumber is the number of the block in which this transaction was skipped.
|
// BlockNumber is the number of the block in which this transaction was skipped.
|
||||||
BlockNumber uint64
|
BlockNumber uint64
|
||||||
|
|
||||||
// BlockNumber is the hash of the block in which this transaction was skipped or nil.
|
// BlockHash is the hash of the block in which this transaction was skipped or nil.
|
||||||
BlockHash *common.Hash
|
BlockHash *common.Hash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,7 +80,7 @@ type SkippedTransactionV2 struct {
|
||||||
// BlockNumber is the number of the block in which this transaction was skipped.
|
// BlockNumber is the number of the block in which this transaction was skipped.
|
||||||
BlockNumber uint64
|
BlockNumber uint64
|
||||||
|
|
||||||
// BlockNumber is the hash of the block in which this transaction was skipped or nil.
|
// BlockHash is the hash of the block in which this transaction was skipped or nil.
|
||||||
BlockHash *common.Hash
|
BlockHash *common.Hash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,8 @@ func (env *TraceEnv) getTxResult(state *state.StateDB, index int, block *types.B
|
||||||
// still we have no state root for per tx, only set the head and tail
|
// still we have no state root for per tx, only set the head and tail
|
||||||
if index == 0 {
|
if index == 0 {
|
||||||
txStorageTrace.RootBefore = state.GetRootHash()
|
txStorageTrace.RootBefore = state.GetRootHash()
|
||||||
} else if index == len(block.Transactions())-1 {
|
}
|
||||||
|
if index == len(block.Transactions())-1 {
|
||||||
txStorageTrace.RootAfter = block.Root()
|
txStorageTrace.RootAfter = block.Root()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import (
|
||||||
const (
|
const (
|
||||||
VersionMajor = 4 // Major version component of the current release
|
VersionMajor = 4 // Major version component of the current release
|
||||||
VersionMinor = 4 // Minor version component of the current release
|
VersionMinor = 4 // Minor version component of the current release
|
||||||
VersionPatch = 4 // Patch version component of the current release
|
VersionPatch = 5 // Patch version component of the current release
|
||||||
VersionMeta = "sepolia" // Version metadata to append to the version string
|
VersionMeta = "sepolia" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue