From 4835f909f822e3c269c6ed27d48a5f24dbf951f9 Mon Sep 17 00:00:00 2001 From: YakupIpek Date: Tue, 6 Dec 2022 05:24:18 +0300 Subject: [PATCH] Revert "Revert "Blockhash property added (#174)" (#177)" (#178) This reverts commit 0ac0541f246e88196f4e3b935ad3dc0269023c8f. --- .../Storage/Mongo/CirrusMongoStorageOperations.cs | 1 + .../NonFungibleToken/ClaimOwnershipLogReader.cs | 2 +- .../Storage/Mongo/Types/CirrusContractTable.cs | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoStorageOperations.cs b/src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoStorageOperations.cs index 1d5743db..7f1fd6df 100644 --- a/src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoStorageOperations.cs +++ b/src/Blockcore.Indexer.Cirrus/Storage/Mongo/CirrusMongoStorageOperations.cs @@ -94,6 +94,7 @@ protected override void OnAddToStorageBatch(StorageBatch storageBatch, SyncBlock FromAddress = receipt.From, ToAddress = receipt.To, BlockIndex = item.BlockInfo.Height, + BlockHash = item.BlockInfo.Hash, TransactionId = receipt.TransactionHash, Success = receipt.Success, Error = receipt.Error, diff --git a/src/Blockcore.Indexer.Cirrus/Storage/Mongo/SmartContracts/NonFungibleToken/ClaimOwnershipLogReader.cs b/src/Blockcore.Indexer.Cirrus/Storage/Mongo/SmartContracts/NonFungibleToken/ClaimOwnershipLogReader.cs index fbfb2652..23d22536 100644 --- a/src/Blockcore.Indexer.Cirrus/Storage/Mongo/SmartContracts/NonFungibleToken/ClaimOwnershipLogReader.cs +++ b/src/Blockcore.Indexer.Cirrus/Storage/Mongo/SmartContracts/NonFungibleToken/ClaimOwnershipLogReader.cs @@ -5,7 +5,7 @@ namespace Blockcore.Indexer.Cirrus.Storage.Mongo.SmartContracts.NonFungibleToken; -public class ClaimOwnershipLogReader : ILogReader +public class ClaimOwnershipLogReader : ILogReader { public bool CanReadLogForMethodType(string methodType) => methodType.Equals("ClaimOwnership"); diff --git a/src/Blockcore.Indexer.Cirrus/Storage/Mongo/Types/CirrusContractTable.cs b/src/Blockcore.Indexer.Cirrus/Storage/Mongo/Types/CirrusContractTable.cs index 68364980..f45dbcf5 100644 --- a/src/Blockcore.Indexer.Cirrus/Storage/Mongo/Types/CirrusContractTable.cs +++ b/src/Blockcore.Indexer.Cirrus/Storage/Mongo/Types/CirrusContractTable.cs @@ -21,6 +21,11 @@ public class CirrusContractTable /// public long BlockIndex { get; set; } + /// + /// Hash of the block that this was confirmed in + /// + public string BlockHash { get; set; } + /// /// The type of contract (this is normally taken from the assembly metadata). ///