Skip to content

Commit

Permalink
re-add removed function
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonNorthey92 committed Mar 4, 2024
1 parent e570978 commit 1b34516
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions service/popm/popm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:]
Expand Down

0 comments on commit 1b34516

Please sign in to comment.