From b094ff0d6cfbd29a02b1af97b1a5305cbf8d7022 Mon Sep 17 00:00:00 2001 From: Lazar Date: Thu, 7 Nov 2024 08:10:27 +0100 Subject: [PATCH] fix nil pointer deref --- harness/btcstaker.go | 1 + harness/subreporter.go | 1 + 2 files changed, 2 insertions(+) diff --git a/harness/btcstaker.go b/harness/btcstaker.go index 9783b78..3bf9f5c 100644 --- a/harness/btcstaker.go +++ b/harness/btcstaker.go @@ -79,6 +79,7 @@ func (s *BTCStaker) runForever(ctx context.Context, stakerAddress btcutil.Addres paramsResp, err := s.client.BTCStakingParams() if err != nil { fmt.Printf("🚫 Err getting staking params %v\n", err) + continue } _ = s.buildAndSendStakingTransaction(ctx, stakerAddress, stakerPk, ¶msResp.Params) } diff --git a/harness/subreporter.go b/harness/subreporter.go index a76a457..a7e7268 100644 --- a/harness/subreporter.go +++ b/harness/subreporter.go @@ -167,6 +167,7 @@ func (s *SubReporter) waitFor2TransactionsConfirmation( proof, err := s.buildSpvProof(txHash, txHash2, requiredDepth) if err != nil { fmt.Printf("🚫 Err building proof %v\n", err) + continue } if proof != nil {