From a8165a940996aab4c11c6c8cd3bbb629cd75100d Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Tue, 27 Feb 2024 20:02:58 +0000 Subject: [PATCH] More cleaning --- service/bss/bss.go | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/service/bss/bss.go b/service/bss/bss.go index 03085cda..63a0b27b 100644 --- a/service/bss/bss.go +++ b/service/bss/bss.go @@ -263,15 +263,16 @@ func (s *Server) handleL2KeytoneRequest(ctx context.Context, msg *bssapi.L2Keyst } func (s *Server) handleBtcFinalityByRecentKeystonesRequest(ctx context.Context, msg *bssapi.BTCFinalityByRecentKeystonesRequest) (*bssapi.BTCFinalityByRecentKeystonesResponse, error) { - request := bfgapi.BTCFinalityByRecentKeystonesRequest{ - NumRecentKeystones: msg.NumRecentKeystones, - } + log.Tracef("handleBtcFinalityByRecentKeystonesRequest") + defer log.Tracef("handleBtcFinalityByRecentKeystonesRequest exit") - // XXX FIXME - response, err := s.callBFG(ctx, &request) + response, err := s.callBFG(ctx, &bfgapi.BTCFinalityByRecentKeystonesRequest{ + NumRecentKeystones: msg.NumRecentKeystones, + }) if err != nil { + e := protocol.NewInternalErrorf("btc finality recent: %v", err) return &bssapi.BTCFinalityByRecentKeystonesResponse{ - Error: protocol.Errorf("%v", err), + Error: e.WireError(), }, err } @@ -281,15 +282,16 @@ func (s *Server) handleBtcFinalityByRecentKeystonesRequest(ctx context.Context, } func (s *Server) handleBtcFinalityByKeystonesRequest(ctx context.Context, msg *bssapi.BTCFinalityByKeystonesRequest) (*bssapi.BTCFinalityByKeystonesResponse, error) { - request := bfgapi.BTCFinalityByKeystonesRequest{ - L2Keystones: msg.L2Keystones, - } + log.Tracef("handleBtcFinalityByKeystonesRequest") + defer log.Tracef("handleBtcFinalityByKeystonesRequest exit") - // XXX FIXME - response, err := s.callBFG(ctx, &request) + response, err := s.callBFG(ctx, &bfgapi.BTCFinalityByKeystonesRequest{ + L2Keystones: msg.L2Keystones, + }) if err != nil { + e := protocol.NewInternalErrorf("btc finality keystones: %v", err) return &bssapi.BTCFinalityByKeystonesResponse{ - Error: protocol.Errorf("%v", err), + Error: e.WireError(), }, err }