From 4e0498faa496db729f1c8add26013b4dc3bf75b8 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Tue, 10 Dec 2024 13:07:46 +0200 Subject: [PATCH] go.mod: update btclog dep This bump includes a fix which prevents attribute value quoting if the value string contains a newline character. This is so that if we call spew.DumpS(), the output will stay nicely formatted. The update also includes a couple more Hex helpers which we can make use of now. --- build/version.go | 8 +------- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/build/version.go b/build/version.go index 632ebafce..c3db5dc70 100644 --- a/build/version.go +++ b/build/version.go @@ -122,11 +122,5 @@ func WithBuildInfo(ctx context.Context, cfg *LogConfig) (context.Context, return nil, fmt.Errorf("unable to decode commit hash: %w", err) } - // Include the first 3 bytes of the commit hash in the context as an - // slog attribute. - if len(commitHash) > 3 { - commitHash = commitHash[:3] - } - - return btclog.WithCtx(ctx, btclog.Hex("rev", commitHash)), nil + return btclog.WithCtx(ctx, btclog.Hex3("rev", commitHash)), nil } diff --git a/go.mod b/go.mod index 7680509fd..35f871376 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/btcsuite/btcd/btcutil/psbt v1.1.8 github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 github.com/btcsuite/btclog v0.0.0-20241003133417-09c4e92e319c - github.com/btcsuite/btclog/v2 v2.0.0 + github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318 github.com/btcsuite/btcwallet v0.16.10-0.20241127094224-93c858b2ad63 github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5 github.com/btcsuite/btcwallet/wallet/txrules v1.2.2 diff --git a/go.sum b/go.sum index 5ed9cd204..c9fb7ff82 100644 --- a/go.sum +++ b/go.sum @@ -92,8 +92,8 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btclog v0.0.0-20241003133417-09c4e92e319c h1:4HxD1lBUGUddhzgaNgrCPsFWd7cGYNpeFUgd9ZIgyM0= github.com/btcsuite/btclog v0.0.0-20241003133417-09c4e92e319c/go.mod h1:w7xnGOhwT3lmrS4H3b/D1XAXxvh+tbhUm8xeHN2y3TQ= -github.com/btcsuite/btclog/v2 v2.0.0 h1:ZfOBItEeLWfU0voi88K72j8vtxP4/dHhxRFf2bxZkVo= -github.com/btcsuite/btclog/v2 v2.0.0/go.mod h1:XItGUfVOxotJL8kkuk2Hj3EVow5KCugXl3wWfQ6K0AE= +github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318 h1:oCjIcinPt7XQ644MP/22JcjYEC84qRc3bRBH0d7Hhd4= +github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318/go.mod h1:XItGUfVOxotJL8kkuk2Hj3EVow5KCugXl3wWfQ6K0AE= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcwallet v0.16.10-0.20241127094224-93c858b2ad63 h1:YN+PekOLlLoGxE3P5RJaGgodZD5DDJSU8eXQZVwwCxM= github.com/btcsuite/btcwallet v0.16.10-0.20241127094224-93c858b2ad63/go.mod h1:1HJXYbjJzgumlnxOC2+ViR1U+gnHWoOn7WeK5OfY1eU=