From 622eba320d991dcbff0f49390c8b2acc3e50d250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20G=C3=B6rtler?= Date: Wed, 15 Jun 2022 12:49:09 +0200 Subject: [PATCH] fix(db): make `transaction_id_index` unique (#287) --- src/db/collections/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/collections/block.rs b/src/db/collections/block.rs index d1d8e2830..4c4987e49 100644 --- a/src/db/collections/block.rs +++ b/src/db/collections/block.rs @@ -63,7 +63,7 @@ impl MongoDb { collection .create_index( IndexModel::builder() - .keys(doc! { "block.payload.transaction_id": 1 }) + .keys(doc! { "block.payload.transaction_id": 1, "metadata.inclusion_state": 1 }) .options( IndexOptions::builder() .unique(true)