sweep: add monitor loop to TxPublisher

This commit finishes the implementation of `TxPublisher` by adding the
monitor process. Whenever a new block arrives, the publisher will check
all its monitored records and attempt fee bumping them if necessary.
This commit is contained in:
yyforyongyu
2024-02-29 19:36:37 +08:00
parent 11f7e455d1
commit 90e727a776
5 changed files with 725 additions and 64 deletions

View File

@@ -1406,6 +1406,10 @@ func (k *kidOutput) ConfHeight() uint32 {
return k.confHeight
}
func (k *kidOutput) RequiredLockTime() (uint32, bool) {
return k.absoluteMaturity, k.absoluteMaturity > 0
}
// Encode converts a KidOutput struct into a form suitable for on-disk database
// storage. Note that the signDescriptor struct field is included so that the
// output's witness can be generated by createSweepTx() when the output becomes