Exemplo n.º 1
0
        public ChainStateBuilderStorage(ChainStateBuilderStorage parentStorage)
        {
            this.isSnapshot   = true;
            this.logger       = parentStorage.logger;
            this.jetDirectory = parentStorage.jetDirectory;
            this.jetDatabase  = parentStorage.jetDatabase;
            this.jetInstance  = parentStorage.jetInstance;

            OpenDatabase(this.jetDatabase, this.jetInstance, true /*readOnly*/,
                         out this.jetSession,
                         out this.utxoDbId,
                         out this.globalTableId,
                         out this.blockHashColumnId,
                         out this.unspentTxTableId,
                         out this.txHashColumnId, out this.confirmedBlockHashColumnId, out this.outputStatesColumnId,
                         out this.unspentTxOutputsTableId,
                         out this.txOutputKeyColumnId, out this.txOutputSmallColumnId, out this.txOutputLargeColumnId, out this.outputScriptHashColumnId);

            Api.JetBeginTransaction2(this.jetSession, BeginTransactionGrbit.ReadOnly);
        }
Exemplo n.º 2
0
 internal ChainStateStorage(ChainStateBuilderStorage parentStorage)
 {
     this.storage = new ChainStateBuilderStorage(parentStorage);
 }