Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): fund faster #5

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions harness/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ func cleanupDir(path string) {
}

func (tm *TestManager) AtomicFundSignSendStakingTx(stakingOutput *wire.TxOut) (*wire.MsgTx, *chainhash.Hash, error) {
tm.mu.Lock()
defer tm.mu.Unlock()
// 1 sat/vB
// = 1 sat/vB × 1000 vB/kvB
// = 1000 sat/kvB × 1/100'000'000 ₿/sat
Expand All @@ -264,9 +262,12 @@ func (tm *TestManager) AtomicFundSignSendStakingTx(stakingOutput *wire.TxOut) (*
tx := wire.NewMsgTx(2)
tx.AddTxOut(stakingOutput)

// todo(lazar): investigate if we can push this more, currently max ~50txs/block
lock := true
rawTxResult, err := tm.TestRpcClient.FundRawTransaction(tx, btcjson.FundRawTransactionOpts{
FeeRate: &feeRate,
ChangePosition: &pos,
LockUnspents: &lock,
}, nil)
if err != nil {
return nil, nil, err
Expand Down
Loading