lnrpc/walletrpc: use current height as height hint for cpfp

In this commit, we address an issue that would cause us to scan from the
genesis block for the spend of an output that we wish to use to raise
the fee of a transaction through CPFP. This was due to setting a 0
height hint when constructing the input required by the sweeper and was
discovered due to the recently added validation checks at the chain
notifier level. We'll now use the current height as the height hint
instead as the sweeper will end up creating a new transaction that
spends the input.
This commit is contained in:
Wilmer Paulino
2019-08-21 17:24:07 -07:00
parent 9e8a1707cc
commit 2cc5891c8c
4 changed files with 31 additions and 1 deletions

View File

@@ -152,6 +152,9 @@ func (s *subRPCServerConfigs) PopulateDependencies(cc *chainControl,
subCfgValue.FieldByName("Sweeper").Set(
reflect.ValueOf(sweeper),
)
subCfgValue.FieldByName("Chain").Set(
reflect.ValueOf(cc.chainIO),
)
case *autopilotrpc.Config:
subCfgValue := extractReflectValue(subCfg)