diff --git a/app/src/main/scala/org/alephium/explorer/persistence/model/EventEntity.scala b/app/src/main/scala/org/alephium/explorer/persistence/model/EventEntity.scala index f70c7266..abe4a053 100644 --- a/app/src/main/scala/org/alephium/explorer/persistence/model/EventEntity.scala +++ b/app/src/main/scala/org/alephium/explorer/persistence/model/EventEntity.scala @@ -67,7 +67,7 @@ object EventEntity { eventIndex, fields, order, - mainChain = true + mainChain = false ) } } diff --git a/app/src/main/scala/org/alephium/explorer/persistence/schema/CustomGetResult.scala b/app/src/main/scala/org/alephium/explorer/persistence/schema/CustomGetResult.scala index 0262a95e..fb66f59e 100644 --- a/app/src/main/scala/org/alephium/explorer/persistence/schema/CustomGetResult.scala +++ b/app/src/main/scala/org/alephium/explorer/persistence/schema/CustomGetResult.scala @@ -377,7 +377,8 @@ object CustomGetResult { destructionTimestamp = result.< + forAll(Gen.nonEmptyListOf(eventEntityGen(true))) { events => insert(events) events.map { event => @@ -55,7 +55,7 @@ class EventQueriesSpec } "get all events with same tx hash" in { - forAll(Gen.nonEmptyListOf(eventEntityGen())) { events => + forAll(Gen.nonEmptyListOf(eventEntityGen(true))) { events => val txHash = transactionHashGen.sample.get val uniqueTxHashEvents = events.zipWithIndex.map { case (event, order) => event.copy(txHash = txHash, eventOrder = order) @@ -73,7 +73,7 @@ class EventQueriesSpec } "get event by contract address" in { - forAll(Gen.nonEmptyListOf(eventEntityGen())) { events => + forAll(Gen.nonEmptyListOf(eventEntityGen(true))) { events => insert(events) events.map { event => @@ -88,7 +88,7 @@ class EventQueriesSpec } "get all events with same contractAddress" in { - forAll(Gen.nonEmptyListOf(eventEntityGen())) { events => + forAll(Gen.nonEmptyListOf(eventEntityGen(true))) { events => val contractAddress = addressGen.sample.get val uniqueContractAddressEvents = events.map { event => event.copy(contractAddress = contractAddress) @@ -121,7 +121,7 @@ class EventQueriesSpec } "get event by contract address and input address" in { - forAll(Gen.nonEmptyListOf(eventEntityGen())) { events => + forAll(Gen.nonEmptyListOf(eventEntityGen(true))) { events => insert(events) events.map { event => @@ -153,7 +153,7 @@ class EventQueriesSpec } "get all events with same contractAddress and input address" in { - forAll(Gen.nonEmptyListOf(eventEntityGen())) { events => + forAll(Gen.nonEmptyListOf(eventEntityGen(true))) { events => val contractAddress = addressGen.sample.get val inputAddress = addressGen.sample.get val uniqueContractAddressEvents = events.map { event =>