Skip to content

Commit

Permalink
define outTxBytesMin and outTxBytesMax as constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Jan 30, 2024
1 parent 2093d3c commit 8e377bc
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions zetaclient/btc_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,11 @@ import (

const (
maxNoOfInputsPerTx = 20
consolidationRank = 10 // the rank below (or equal to) which we consolidate UTXOs
consolidationRank = 10 // the rank below (or equal to) which we consolidate UTXOs
outTxBytesMin = uint64(239) // 239vB == EstimateSegWitTxSize(2, 3)
outTxBytesMax = uint64(1531) // 1531v == EstimateSegWitTxSize(21, 3)
)

var (
outTxBytesMin uint64
outTxBytesMax uint64
)

func init() {
outTxBytesMin = EstimateSegWitTxSize(2, 3) // 239vB, estimated size for a 2-input, 3-output SegWit tx
outTxBytesMax = EstimateSegWitTxSize(21, 3) // 1531vB, estimated size for a 21-input, 3-output SegWit tx
}

type BTCSigner struct {
tssSigner TSSSigner
rpcClient BTCRPCClient
Expand Down

0 comments on commit 8e377bc

Please sign in to comment.