Skip to content

Commit

Permalink
ci lints
Browse files Browse the repository at this point in the history
  • Loading branch information
cong-or committed Jan 22, 2024
1 parent 55a65aa commit 1198534
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
8 changes: 1 addition & 7 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,5 @@
"styles.min.css",
"web-components.min.js",
"**/generated/**"
],
"flagWords": [
"Pseudocode",
"pseudocode",
"RAII",
"updatedb"
],
]
}
14 changes: 7 additions & 7 deletions docs/src/architecture/08_concepts/gateway/concrete.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
icon: material/hub
---

# Pseudocode
# Pseudo code

Building blocks in the form of *pseudocode*;
Building blocks in the form of *pseudo code*;
Intended to make the conceptual design more concrete; not setting rules.

## Node
Expand All @@ -26,7 +26,7 @@ fn config_exists(db: DBHandler) -> Option<Config> {
// lock db
// if config exists { Some(config) }
// else { None }
// RAII drop trait -> unlock db
// Resource acquisition is initialization: drop trait -> unlock db
}
```

Expand All @@ -49,7 +49,7 @@ fn config_updated(db: DBHandler) -> Option<Config> {
// lock db
// if config updated { Some(config) }
// else { None }
// RAII drop trait -> unlock db
// Resource acquisition is initialization: drop trait -> unlock db
}
```

Expand All @@ -75,7 +75,7 @@ fn database_ready_to_update(db: DBHandler) -> bool {
// lock db
// let last_updated = CardanoUpdateTable()
// return update_threshold(last_updated)
// RAII drop trait -> unlock db
// Resource acquisition is initialization: drop trait -> unlock db
}
```

Expand All @@ -88,15 +88,15 @@ fn update_database(db: DBHandler, stream: FollowerIo) -> Result<(), Err> {
let metadata = parse(block);
db.insert(metadata);
}
// RAII drop trait -> unlock db
// Resource acquisition is initialization: drop trait -> unlock db
}
```

Parse block

```rust
fn parse(block: Block) -> Result<MetaBlock, Err> {
// extract era, UTXO, spent TXs and registration metadata
// extract era, unspent transaction output, spent Transactions and registration metadata
}
```

Expand Down

0 comments on commit 1198534

Please sign in to comment.