Add chronicles formatters for aristo db types (#1889)

This commit is contained in:
Kim De Mey 2023-11-09 13:22:51 +01:00 committed by GitHub
parent 6e0397e276
commit bb88b50298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,10 @@
# Nimbus
# Copyright (c) 2021-2023 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.
name: fluffy CI
on:
push:
@ -8,6 +15,7 @@ on:
- '!fluffy/docs/**'
- 'nimbus/rpc/hexstrings.nim'
- 'nimbus/rpc/rpc_*.nim'
- 'nimbus/db/**'
- 'vendor/**'
- 'Makefile'
- 'nimbus.nimble'
@ -20,6 +28,7 @@ on:
- '!fluffy/docs/**'
- 'nimbus/rpc/hexstrings.nim'
- 'nimbus/rpc/rpc_*.nim'
- 'nimbus/db/**'
- 'vendor/**'
- 'Makefile'
- 'nimbus.nimble'

View File

@ -18,6 +18,7 @@ import
std/[sequtils, strutils, hashes],
eth/[common, trie/nibbles],
stew/byteutils,
chronicles,
results,
stint
@ -97,6 +98,13 @@ type
root*: VertexID ## Root ID for the sub-trie.
key*: HashKey ## Merkle hash or encoded small node data
# ------------------------------------------------------------------------------
# Chronicles formatters
# ------------------------------------------------------------------------------
chronicles.formatIt(VertexID): $it
chronicles.formatIt(QueueID): $it
# ------------------------------------------------------------------------------
# Private helpers
# ------------------------------------------------------------------------------