-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
This is not true if two people publish the exact same happ. In that case there are two HHA hashes which both have the same DNA hash.
Lines 1209 to 1231 in 898ad4b
| async recordHha(hha_hash) { | |
| // dna2hha is add-only | |
| if (!this.hhaExists(hha_hash)) { | |
| log.info("Retrieve the hosted app cell_data using the anonymous installed_app_id: '%s'", hha_hash); | |
| const appInfo = await this.callConductor("app", { installed_app_id: hha_hash }); | |
| if (!appInfo) { | |
| throw new Error(`No app found with installed_app_id: ${hha_hash}`); | |
| } | |
| // TODO but leave it for now: I am operating under the assumption that each dna_hash can be only in one app (identified by hha_hash) | |
| // Does this need to change? | |
| appInfo.cell_data.forEach(cell => { | |
| let dna_hash_string = Codec.HoloHash.encode("dna", cell.cell_id[0]); // cell.cell_id[0] is binary buffer of dna_hash | |
| this.dna2hha[dna_hash_string] = hha_hash; | |
| }); | |
| } | |
| } | |
| hhaExists(hha_hash) { | |
| return Object.values(this.dna2hha).includes(hha_hash); | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels