From fa40fa6950b84005ffa095fd9de0d1cbae73dd32 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 14 Nov 2019 16:09:07 +0100 Subject: [PATCH] chainntnfs/interface: add String method for SpendDetaill --- chainntnfs/interface.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chainntnfs/interface.go b/chainntnfs/interface.go index 88a389dd..ace86e77 100644 --- a/chainntnfs/interface.go +++ b/chainntnfs/interface.go @@ -241,6 +241,12 @@ type SpendDetail struct { SpendingHeight int32 } +// String returns a string representation of SpendDetail. +func (s *SpendDetail) String() string { + return fmt.Sprintf("%v[%d] spending %v at height=%v", s.SpenderTxHash, + s.SpenderInputIndex, s.SpentOutPoint, s.SpendingHeight) +} + // SpendEvent encapsulates a spentness notification. Its only field 'Spend' will // be sent upon once the target output passed into RegisterSpendNtfn has been // spent on the blockchain.