From 1b34516687cbad8c9413e3fc8addac48e9802afe Mon Sep 17 00:00:00 2001 From: ClaytonNorthey92 Date: Mon, 4 Mar 2024 12:15:22 -0500 Subject: [PATCH] re-add removed function --- service/popm/popm.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/service/popm/popm.go b/service/popm/popm.go index 896060ed7..d7c425716 100644 --- a/service/popm/popm.go +++ b/service/popm/popm.go @@ -368,6 +368,22 @@ func (m *Miner) Ping(ctx context.Context, timestamp int64) (*bfgapi.PingResponse return pr, nil } +func (m *Miner) L2Keystones(ctx context.Context, count uint64) (*bfgapi.L2KeystonesResponse, error) { + res, err := m.callBFG(ctx, m.requestTimeout, &bfgapi.L2KeystonesRequest{ + NumL2Keystones: count, + }) + if err != nil { + return nil, fmt.Errorf("l2keystones: %w", err) + } + + kr, ok := res.(*bfgapi.L2KeystonesResponse) + if !ok { + return nil, fmt.Errorf("not a L2KeystonesResponse: %T", res) + } + + return kr, nil +} + func (m *Miner) BitcoinBalance(ctx context.Context, scriptHash string) (*bfgapi.BitcoinBalanceResponse, error) { if scriptHash[0:2] == "0x" || scriptHash[0:2] == "0X" { scriptHash = scriptHash[2:]