mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 04:04:21 +01:00
Change representation of taproot trees & Internal fixes (#384)
* migrate descriptors --> tapscripts * fix covenantless * dynamic boarding exit delay * remove duplicates in tree and bitcointree * agnostic signatures validation * revert GetInfo change * renaming VtxoScript var * Agnostic script server (#6) * Hotfix: Prevent ZMQ-based bitcoin wallet to panic (#383) * Hotfix bct embedded wallet w/ ZMQ * Fixes * Rename vtxo is_oor to is_pending (#385) * Rename vtxo is_oor > is_pending * Clean swaggers * Revert changes to client and sdk * descriptor in oneof * support CHECKSIG_ADD in MultisigClosure * use right witness size in OOR tx fee estimation * Revert changes --------- Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
This commit is contained in:
@@ -163,11 +163,11 @@ func (n *node) getWitnessData() (
|
||||
}
|
||||
|
||||
sweepClosure := &CSVSigClosure{
|
||||
Pubkey: n.sweepKey,
|
||||
Seconds: uint(n.roundLifetime),
|
||||
MultisigClosure: MultisigClosure{PubKeys: []*secp256k1.PublicKey{n.sweepKey}},
|
||||
Seconds: uint(n.roundLifetime),
|
||||
}
|
||||
|
||||
sweepLeaf, err := sweepClosure.Leaf()
|
||||
sweepLeaf, err := sweepClosure.Script()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -183,13 +183,14 @@ func (n *node) getWitnessData() (
|
||||
MinRelayFee: n.feeSats,
|
||||
}
|
||||
|
||||
unrollLeaf, err := unrollClosure.Leaf()
|
||||
unrollScript, err := unrollClosure.Script()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
branchTaprootTree := taproot.AssembleTaprootScriptTree(
|
||||
*unrollLeaf, *sweepLeaf,
|
||||
taproot.NewBaseTapElementsLeaf(unrollScript),
|
||||
taproot.NewBaseTapElementsLeaf(sweepLeaf),
|
||||
)
|
||||
root := branchTaprootTree.RootNode.TapHash()
|
||||
|
||||
@@ -224,13 +225,14 @@ func (n *node) getWitnessData() (
|
||||
RightAmount: rightAmount,
|
||||
}
|
||||
|
||||
unrollLeaf, err := unrollClosure.Leaf()
|
||||
unrollLeaf, err := unrollClosure.Script()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
branchTaprootTree := taproot.AssembleTaprootScriptTree(
|
||||
*unrollLeaf, *sweepLeaf,
|
||||
taproot.NewBaseTapElementsLeaf(unrollLeaf),
|
||||
taproot.NewBaseTapElementsLeaf(sweepLeaf),
|
||||
)
|
||||
root := branchTaprootTree.RootNode.TapHash()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user