mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
Support forfeit with CHECKLOCKTIMEVERIFY (#389)
* explicit Timelock struct * support & test CLTV forfeit path * fix wasm pkg * fix wasm * fix liquid GetCurrentBlockTime * cleaning * move esplora URL check
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ark-network/ark/common"
|
||||
"github.com/ark-network/ark/common/note"
|
||||
"github.com/ark-network/ark/common/tree"
|
||||
"github.com/ark-network/ark/server/internal/core/domain"
|
||||
@@ -357,12 +358,12 @@ func findSweepableOutputs(
|
||||
}
|
||||
}
|
||||
|
||||
var lifetime int64
|
||||
var lifetime *common.Locktime
|
||||
lifetime, sweepInput, err = txbuilder.GetSweepInput(node)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
expirationTime = blocktimeCache[node.ParentTxid] + lifetime
|
||||
expirationTime = blocktimeCache[node.ParentTxid] + int64(lifetime.Value)
|
||||
} else {
|
||||
// cache the blocktime for future use
|
||||
if schedulerUnit == ports.BlockHeight {
|
||||
|
||||
Reference in New Issue
Block a user