Skip to content

Commit ccd276e

Browse files
committed
chain/ethereum: Use the log_index as the transaction_log_index
This reverts an inadvertent change that was introduced in PR #5867
1 parent 3017b70 commit ccd276e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

chain/ethereum/src/trigger.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,13 @@ impl<'a> EthereumEventData<'a> {
572572
}
573573

574574
pub fn transaction_log_index(&self) -> &U256 {
575-
self.log
576-
.transaction_log_index
577-
.as_ref()
578-
.unwrap_or(&U256_DEFAULT)
575+
// We purposely use the `log_index` here. Geth does not support
576+
// `transaction_log_index`, and subgraphs that use it only care that
577+
// it identifies the log, the specific value is not important. Still
578+
// this will change the output of subgraphs that use this field.
579+
//
580+
// This was initially changed in commit b95c6953
581+
self.log.log_index.as_ref().unwrap_or(&U256_DEFAULT)
579582
}
580583

581584
pub fn log_type(&self) -> &Option<String> {

0 commit comments

Comments
 (0)