Add Incremental Snapshot support to RPC (#19559)

#### Problem

There's no way to get incremental snapshot information from RPC.

#### Summary of Changes

- Add new RPC method, `getHighestSnapshotSlot` that returns a `SnapshotSlotInfo`, which contains both the highest full snapshot slot, and the highest incremental snapshot slot _based on_ the full snapshot.
- Deprecate old RPC method, `getSnapshotSlot`
- Update API docs

Fixes #19579
This commit is contained in:
Brooks Prumo
2021-09-02 15:25:42 -05:00
committed by GitHub
parent f4f14c42bb
commit 8ac94b2cf4
9 changed files with 227 additions and 78 deletions

View File

@@ -435,3 +435,9 @@ impl From<ConfirmedTransactionStatusWithSignature> for RpcConfirmedTransactionSt
}
}
}
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq)]
pub struct RpcSnapshotSlotInfo {
pub full: Slot,
pub incremental: Option<Slot>,
}