gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: tombstones


From: gnunet
Subject: [taler-wallet-core] branch master updated: tombstones
Date: Wed, 12 May 2021 15:26:20 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new b1500241 tombstones
b1500241 is described below

commit b1500241f7672c8f73047014c55ff723595c3d13
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed May 12 15:26:15 2021 +0200

    tombstones
---
 packages/taler-util/src/backupTypes.ts | 15 ++++++++-------
 packages/taler-wallet-core/src/db.ts   | 14 ++++++++++++++
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/packages/taler-util/src/backupTypes.ts 
b/packages/taler-util/src/backupTypes.ts
index 1980bfb4..e0b12a06 100644
--- a/packages/taler-util/src/backupTypes.ts
+++ b/packages/taler-util/src/backupTypes.ts
@@ -155,7 +155,8 @@ export interface WalletBackupContentV1 {
   purchases: BackupPurchase[];
 
   /**
-   * All backup providers.
+   * All backup providers.  Backup providers
+   * in this list should be considered "active".
    *
    * Sorted by the provider base URL.
    */
@@ -195,16 +196,16 @@ export interface WalletBackupContentV1 {
   error_reports: BackupErrorReport[];
 
   /**
-   * Deletion tombstones.  Sorted by (type, id)
-   * in ascending order.
+   * Deletion tombstones.  Lexically sorted.
    */
   tombstones: Tombstone[];
 }
 
-export interface Tombstone {
-  type: string;
-  id: string;
-}
+
+/**
+ * Tombstone in the format "<type>:<key>"
+ */
+export type Tombstone = string;
 
 /**
  * Detailed error report.
diff --git a/packages/taler-wallet-core/src/db.ts 
b/packages/taler-wallet-core/src/db.ts
index 946e71e1..7a7c3656 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -1695,6 +1695,13 @@ export interface GhostDepositGroupRecord {
   }[];
 }
 
+export interface TombstoneRecord {
+  /**
+   * Tombstone ID, with the syntax "<type>:<key>".
+   */
+  id: string;
+}
+
 class ExchangesStore extends Store<"exchanges", ExchangeRecord> {
   constructor() {
     super("exchanges", { keyPath: "baseUrl" });
@@ -1877,6 +1884,12 @@ class DepositGroupsStore extends Store<"depositGroups", 
DepositGroupRecord> {
   }
 }
 
+class TombstonesStore extends Store<"tombstones", TombstoneRecord> {
+  constructor() {
+    super("tombstones", { keyPath: "id" });
+  }
+}
+
 /**
  * The stores and indices for the wallet database.
  */
@@ -1904,6 +1917,7 @@ export const Stores = {
   bankWithdrawUris: new BankWithdrawUrisStore(),
   backupProviders: new BackupProvidersStore(),
   depositGroups: new DepositGroupsStore(),
+  tombstones: new TombstonesStore(),
   ghostDepositGroups: new Store<"ghostDepositGroups", GhostDepositGroupRecord>(
     "ghostDepositGroups",
     {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]