Skip to content

Commit 9c1433b

Browse files
authored
fix(trace): use correct roots in trace of block with one transaction (#508)
fix: use correct roots in trace of block with one transaction
1 parent 1d824f4 commit 9c1433b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

core/rawdb/accessors_skipped_txs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type SkippedTransaction struct {
5858
// BlockNumber is the number of the block in which this transaction was skipped.
5959
BlockNumber uint64
6060

61-
// BlockNumber is the hash of the block in which this transaction was skipped or nil.
61+
// BlockHash is the hash of the block in which this transaction was skipped or nil.
6262
BlockHash *common.Hash
6363
}
6464

@@ -80,7 +80,7 @@ type SkippedTransactionV2 struct {
8080
// BlockNumber is the number of the block in which this transaction was skipped.
8181
BlockNumber uint64
8282

83-
// BlockNumber is the hash of the block in which this transaction was skipped or nil.
83+
// BlockHash is the hash of the block in which this transaction was skipped or nil.
8484
BlockHash *common.Hash
8585
}
8686

core/trace.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ func (env *TraceEnv) getTxResult(state *state.StateDB, index int, block *types.B
322322
// still we have no state root for per tx, only set the head and tail
323323
if index == 0 {
324324
txStorageTrace.RootBefore = state.GetRootHash()
325-
} else if index == len(block.Transactions())-1 {
325+
}
326+
if index == len(block.Transactions())-1 {
326327
txStorageTrace.RootAfter = block.Root()
327328
}
328329

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const (
2525
VersionMajor = 4 // Major version component of the current release
2626
VersionMinor = 4 // Minor version component of the current release
27-
VersionPatch = 4 // Patch version component of the current release
27+
VersionPatch = 5 // Patch version component of the current release
2828
VersionMeta = "sepolia" // Version metadata to append to the version string
2929
)
3030

0 commit comments

Comments
 (0)