File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 52
52
(go-try
53
53
(when-let [[commit _proof] (<? (read-verified-commit storage commit-address))]
54
54
(let [commit-id (commit-data/hash->commit-id commit-hash)]
55
- (assoc commit :id commit-id)))))
55
+ (assoc commit
56
+ :id commit-id
57
+ const/iri-address commit-address)))))
56
58
57
59
(defn read-data-jsonld
58
60
[storage address]
Original file line number Diff line number Diff line change 117
117
(if-let [expanded-commit (<? (commit-storage/read-commit-jsonld commit-catalog address hash))]
118
118
(if-let [ledger-alias (get-first-value expanded-commit const/iri-alias)]
119
119
(if-let [ledger-ch (cached-ledger conn ledger-alias)]
120
- (do (log/debug " Notification received for ledger" ledger-alias " of new commit:" expanded-commit)
121
- (let [db-address (-> expanded-commit
120
+ (do (log/debug " Notification received for ledger" ledger-alias
121
+ " of new commit:" expanded-commit)
122
+ (let [ledger (<? ledger-ch)
123
+ db-address (-> expanded-commit
122
124
(get-first const/iri-data)
123
125
(get-first-value const/iri-address))
124
- expanded-data (<? (commit-storage/read-data-jsonld commit-catalog db-address))
125
- ledger (<? ledger-ch)
126
- status (<? (ledger/notify ledger expanded-commit expanded-data))]
127
- (case status
126
+ expanded-data (<? (commit-storage/read-data-jsonld commit-catalog db-address))]
127
+ (case (<? (ledger/notify ledger expanded-commit expanded-data))
128
128
(::ledger/current ::ledger/newer ::ledger/updated )
129
129
(do (log/debug " Ledger" ledger-alias " is up to date" )
130
130
true )
You can’t perform that action at this time.
0 commit comments