From bb88b5029815e38407e8cc5560ed95ce66dc920f Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Thu, 9 Nov 2023 13:22:51 +0100 Subject: [PATCH] Add chronicles formatters for aristo db types (#1889) --- .github/workflows/fluffy.yml | 9 +++++++++ nimbus/db/aristo/aristo_desc/desc_identifiers.nim | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/fluffy.yml b/.github/workflows/fluffy.yml index 050a9d712..076e1c730 100644 --- a/.github/workflows/fluffy.yml +++ b/.github/workflows/fluffy.yml @@ -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' diff --git a/nimbus/db/aristo/aristo_desc/desc_identifiers.nim b/nimbus/db/aristo/aristo_desc/desc_identifiers.nim index e392e7fbb..dcb4512d0 100644 --- a/nimbus/db/aristo/aristo_desc/desc_identifiers.nim +++ b/nimbus/db/aristo/aristo_desc/desc_identifiers.nim @@ -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 # ------------------------------------------------------------------------------