-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rm panda refs outside core module; preprocess text/ANSI artwork sources
- Loading branch information
Showing
8 changed files
with
50 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file renamed
BIN
+3.65 KB
...sus_object_pools/pandas/blink-version.txt → ...bject_pools/vanity_logs/blink-version.ans
Binary file not shown.
Binary file renamed
BIN
+3.62 KB
...sus_object_pools/pandas/color-version.txt → ...bject_pools/vanity_logs/color-version.ans
Binary file not shown.
37 changes: 37 additions & 0 deletions
37
beacon_chain/consensus_object_pools/vanity_logs/pandas.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# beacon_chain | ||
# Copyright (c) 2022 Status Research & Development GmbH | ||
# Licensed and distributed under either of | ||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). | ||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). | ||
# at your option. This file may not be copied, modified, or distributed except according to those terms. | ||
|
||
{.push raises: [Defect].} | ||
|
||
import chronicles | ||
from ".."/".."/conf import StdoutLogKind | ||
|
||
type | ||
VanityLogs* = object | ||
onMergeTransitionBlock*: proc() {.gcsafe, raises: [Defect].} | ||
onFinalizedMergeTransitionBlock*: proc() {.gcsafe, raises: [Defect].} | ||
|
||
# These need to be the main body of the log not to be reformatted or escaped. | ||
proc mono🐼() = notice "text-version.txt".staticRead | ||
proc color🐼() = notice "color-version.ans".staticRead | ||
proc blink🐼() = notice "blink-version.ans".staticRead | ||
|
||
func getPandas*(stdoutKind: StdoutLogKind): VanityLogs = | ||
case stdoutKind | ||
of StdoutLogKind.Auto: raiseAssert "inadmissable here" | ||
of StdoutLogKind.Colors: | ||
VanityLogs( | ||
onMergeTransitionBlock: color🐼, | ||
onFinalizedMergeTransitionBlock: blink🐼) | ||
of StdoutLogKind.NoColors: | ||
VanityLogs( | ||
onMergeTransitionBlock: mono🐼, | ||
onFinalizedMergeTransitionBlock: mono🐼) | ||
of StdoutLogKind.Json, StdoutLogKind.None: | ||
VanityLogs( | ||
onMergeTransitionBlock: (proc() = notice "🐼 Proof of Stake Activated 🐼"), | ||
onFinalizedMergeTransitionBlock: (proc() = notice "🐼 Proof of Stake Finalized 🐼")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters