mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-16 04:55:18 +00:00
b72815387a
* concepts * messages * events * begin block * address revisions Co-authored-by: karzak <kjydavis3@gmail.com>
15 lines
693 B
Markdown
15 lines
693 B
Markdown
<!--
|
|
order: 6
|
|
-->
|
|
|
|
# Begin Block
|
|
|
|
At the start of each block, proposals are processed. Active proposals with "first-past-the-post" vote tallying are evaluated and if they meet quorum and voting threshold requirements are enacted, resulting in the deletion of the proposal and any associated votes. If a "first-past-the-post" proposal doesn't meet quorum and voting threshold requirements by its deadline it is not enacted and is deleted. Proposals with "deadline" vote tallying are evaluated at their deadline before being deleted.
|
|
|
|
```go
|
|
// BeginBlocker runs at the start of every block.
|
|
func BeginBlocker(ctx sdk.Context, _ abci.RequestBeginBlock, k Keeper) {
|
|
k.ProcessProposals(ctx)
|
|
}
|
|
```
|