Skip to content

Commit

Permalink
Fix the event relevancy fields (#1506)
Browse files Browse the repository at this point in the history
* Fix the event relevancy fields

* adding logindex and txindex
  • Loading branch information
otherview authored Sep 7, 2023
1 parent b4cbf13 commit 5b18d68
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
36 changes: 18 additions & 18 deletions go/common/tracers/debug_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ type DebugLogs struct {
// this holds a copy of the gethtypes.Log log marshaller
func (l DebugLogs) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
Address gethcommon.Address `json:"address" gencodec:"required"`
Topics []gethcommon.Hash `json:"topics" gencodec:"required"`
Data hexutil.Bytes `json:"data" gencodec:"required"`
BlockNumber hexutil.Uint64 `json:"blockNumber"`
TxHash gethcommon.Hash `json:"transactionHash" gencodec:"required"`
TxIndex hexutil.Uint `json:"transactionIndex"`
BlockHash gethcommon.Hash `json:"blockHash"`
Index hexutil.Uint `json:"logIndex"`
Removed bool `json:"removed"`
LifecycleEvent bool `json:"lifecycleEvent"`
RelAddress1 *gethcommon.Hash `json:"relAddress1"`
RelAddress2 *gethcommon.Hash `json:"relAddress2"`
RelAddress3 *gethcommon.Hash `json:"relAddress3"`
RelAddress4 *gethcommon.Hash `json:"relAddress4"`
Address string `json:"address" gencodec:"required"`
Topics []gethcommon.Hash `json:"topics" gencodec:"required"`
Data hexutil.Bytes `json:"data" gencodec:"required"`
BlockNumber uint64 `json:"blockNumber"`
TxHash gethcommon.Hash `json:"transactionHash" gencodec:"required"`
TxIndex uint `json:"transactionIndex"`
BlockHash gethcommon.Hash `json:"blockHash"`
Index uint `json:"logIndex"`
Removed bool `json:"removed"`
LifecycleEvent bool `json:"lifecycleEvent"`
RelAddress1 *gethcommon.Hash `json:"relAddress1"`
RelAddress2 *gethcommon.Hash `json:"relAddress2"`
RelAddress3 *gethcommon.Hash `json:"relAddress3"`
RelAddress4 *gethcommon.Hash `json:"relAddress4"`
}{
l.Address,
l.Address.Hex(),
l.Topics,
l.Data,
hexutil.Uint64(l.BlockNumber),
l.BlockNumber,
l.TxHash,
hexutil.Uint(l.TxIndex),
l.TxIndex,
l.BlockHash,
hexutil.Uint(l.Index),
l.Index,
l.Removed,
l.LifecycleEvent,
l.RelAddress1,
Expand Down
1 change: 1 addition & 0 deletions integration/simulation/network/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (n *networkOfSocketNodes) Create(simParams *params.SimParams, _ *stats.Stat
node.WithL1WSPort(simParams.StartPort+100),
node.WithInboundP2PDisabled(isInboundP2PDisabled),
node.WithLogLevel(4),
node.WithDebugNamespaceEnabled(true),
),
)

Expand Down

0 comments on commit 5b18d68

Please sign in to comment.