mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
Add forfeit address in GetInfo (#326)
* keep track of forfeit transaction funds * [btc-embedded] use p2wpkh address * [sdk] fix clients * use script as argument of BuildForfeitTxs
This commit is contained in:
@@ -599,6 +599,11 @@ func (s *covenantlessService) GetInfo(ctx context.Context) (*ServiceInfo, error)
|
||||
return nil, fmt.Errorf("failed to get dust amount: %s", err)
|
||||
}
|
||||
|
||||
forfeitAddr, err := s.wallet.GetForfeitAddress(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get forfeit address: %s", err)
|
||||
}
|
||||
|
||||
return &ServiceInfo{
|
||||
PubKey: pubkey,
|
||||
RoundLifetime: s.roundLifetime,
|
||||
@@ -614,6 +619,7 @@ func (s *covenantlessService) GetInfo(ctx context.Context) (*ServiceInfo, error)
|
||||
s.boardingExitDelay,
|
||||
"USER",
|
||||
),
|
||||
ForfeitAddress: forfeitAddr,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -962,7 +968,7 @@ func (s *covenantlessService) startFinalization() {
|
||||
minRelayFeeRate := s.wallet.MinRelayFeeRate(ctx)
|
||||
|
||||
if needForfeits {
|
||||
connectors, forfeitTxs, err = s.builder.BuildForfeitTxs(s.pubkey, unsignedRoundTx, payments, minRelayFeeRate)
|
||||
connectors, forfeitTxs, err = s.builder.BuildForfeitTxs(unsignedRoundTx, payments, minRelayFeeRate)
|
||||
if err != nil {
|
||||
round.Fail(fmt.Errorf("failed to create connectors and forfeit txs: %s", err))
|
||||
log.WithError(err).Warn("failed to create connectors and forfeit txs")
|
||||
|
||||
Reference in New Issue
Block a user