diff --git a/src/services/new/chainBridgeV2.ts b/src/services/new/chainBridgeV2.ts index 8cd6159..2badb5e 100644 --- a/src/services/new/chainBridgeV2.ts +++ b/src/services/new/chainBridgeV2.ts @@ -493,6 +493,8 @@ export class ChainBridgeV2 { local: false, accessible: true, first_seen: new Date(), + anchored_height: endBlock, + anchored_block: blockId, src: "vsc" }) } diff --git a/src/services/new/witness/electionManager.ts b/src/services/new/witness/electionManager.ts index 0cc8255..a124cbe 100644 --- a/src/services/new/witness/electionManager.ts +++ b/src/services/new/witness/electionManager.ts @@ -417,7 +417,7 @@ export class ElectionManager { } async init() { - this.electionDb = this.self.db.collection('election_result') + this.electionDb = this.self.db.collection('election_results') this.mongoLogs = this.self.db.collection('logs') this.self.p2pService.multicastChannel.register('hold_election', this.handlePeerMsg, { diff --git a/src/services/new/witness/versionManager.ts b/src/services/new/witness/versionManager.ts index 1cae1cc..0e53e99 100644 --- a/src/services/new/witness/versionManager.ts +++ b/src/services/new/witness/versionManager.ts @@ -6,9 +6,9 @@ import { Collection } from "mongodb"; export const VersionConfig = { - index_reset_id: 4, + index_reset_id: 5, //Match with package.json and tag - version_id: 'v0.1.0' + version_id: 'v0.1.1' } /** @@ -27,6 +27,7 @@ export class VersionManager { witnessDb: Collection; accountAuths: Collection; txDb: Collection; + electionResults: Collection; constructor(self: NewCoreService) { this.self = self; @@ -40,6 +41,7 @@ export class VersionManager { this.witnessDb = this.self.db.collection('witnesses') this.accountAuths = this.self.db.collection('account_auths') this.txDb = this.self.db.collection('transaction_pool') + this.electionResults = this.self.db.collection('election_results') this.init = this.init.bind(this) } @@ -89,6 +91,7 @@ export class VersionManager { await this.nonceMap.deleteMany({}) await this.blockHeaders.deleteMany({}) await this.txDb.deleteMany({}) + await this.electionResults.deleteMany({}) await this.streamState.deleteOne({ id: 'last_hb_processed'