Skip to content

Commit

Permalink
Merge pull request #48 from TaggrNetwork/pre-release
Browse files Browse the repository at this point in the history
Pre release
  • Loading branch information
taggrx authored Apr 20, 2024
2 parents 9a79dc4 + 7d7de4b commit 7bd956c
Show file tree
Hide file tree
Showing 15 changed files with 285 additions and 289 deletions.
2 changes: 1 addition & 1 deletion docs/WHITEPAPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Below is a breakdown of costs.

| Function | credits 🔥 | Comments |
| :--------------------------- | -----------------: | :--------------------------------------------------------------------------------------------------------- |
| New post or comment | `$post_cost` | |
| New post or comment | `$post_cost` | Per kilobyte. |
| Hashtags | `T * followers(T)` | Each unique hashtag `T` is charged with the number of credits corresponding to the number of its followers |
| On-chain pictures | `B * $blob_cost` | For `B` pictures in a post or comment |
| Poll | `$poll_cost` | For adding a poll to a post or comment |
Expand Down
12 changes: 0 additions & 12 deletions src/backend/env/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,18 +331,6 @@ impl<K: Eq + Ord + Clone + Copy + Display, T: Serialize + DeserializeOwned> Obje
self.index.len()
}

// TODO: delete after restoring data
pub fn reset(&mut self) {
self.index.clear()
}

// TODO: delete after restoring data
pub fn reinsert(&mut self, id: K, value: T) {
assert!(self.initialized, "allocator uninitialized");
self.index
.insert(id, self.api.borrow_mut().write(&value).unwrap());
}

pub fn insert(&mut self, id: K, value: T) -> Result<(), String> {
assert!(self.initialized, "allocator uninitialized");
if self.index.contains_key(&id) {
Expand Down
Loading

0 comments on commit 7bd956c

Please sign in to comment.