From b4329423c2690a629e8d7e73b654d2b2fcef65c3 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 8 Apr 2026 15:02:53 +0545 Subject: [PATCH] darepod: expose stored vtxos for harness inspection Add a narrow accessor for persisted VTXO descriptors so server-side integration helpers can inspect a daemon's stored tree path without reaching into private daemon fields. This keeps the harness-facing contract explicit and avoids coupling tests to internal struct layout. --- darepod/server.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/darepod/server.go b/darepod/server.go index bc959bd16..f785f42d6 100644 --- a/darepod/server.go +++ b/darepod/server.go @@ -314,6 +314,21 @@ func (s *Server) RPCAddr() net.Addr { return s.rpcAddr } +// GetStoredVTXO returns the persisted VTXO descriptor for the +// given outpoint. This method exists for test harnesses only; +// it lets integration tests inspect locally stored partial +// unroll state without reaching into internal daemon fields. +func (s *Server) GetStoredVTXO(ctx context.Context, + outpoint wire.OutPoint) (*vtxo.Descriptor, error) { + + if s.vtxoStore == nil { + return nil, fmt.Errorf("client daemon VTXO " + + "store not initialized") + } + + return s.vtxoStore.GetVTXO(ctx, outpoint) +} + // RunUntilShutdown starts all subsystems and blocks until the shutdown // interceptor fires or a fatal error occurs. The startup sequence // branches on the configured wallet type: in lnd mode, the daemon