diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs index 74440cdd0c0a8f..3e98ec3656c153 100644 --- a/ledger/src/blockstore.rs +++ b/ledger/src/blockstore.rs @@ -2109,6 +2109,17 @@ impl Blockstore { if !self.is_primary_access() { return Ok(()); } + + // Initialize TransactionStatusIndexMeta if they are not present already + if self.transaction_status_index_cf.get(0)?.is_none() { + self.transaction_status_index_cf + .put(0, &TransactionStatusIndexMeta::default())?; + } + if self.transaction_status_index_cf.get(1)?.is_none() { + self.transaction_status_index_cf + .put(1, &TransactionStatusIndexMeta::default())?; + } + // If present, delete dummy entries inserted by old software // https://github.com/solana-labs/solana/blob/bc2b372/ledger/src/blockstore.rs#L2130-L2137 let transaction_status_dummy_key = cf::TransactionStatus::as_index(2);