mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-20 02:11:40 +01:00
Add log message for the case where we match a script but do not have a matching address in our database (#4156)
This commit is contained in:
parent
4cefa56c99
commit
f1bd0ea3a5
@ -527,13 +527,21 @@ private[bitcoins] trait TransactionProcessing extends WalletLogger {
|
|||||||
blockHashOpt: Option[DoubleSha256DigestBE]): Future[
|
blockHashOpt: Option[DoubleSha256DigestBE]): Future[
|
||||||
Seq[SpendingInfoDb]] = {
|
Seq[SpendingInfoDb]] = {
|
||||||
|
|
||||||
|
val spks = outputsWithIndex.map(_.output.scriptPubKey).toVector
|
||||||
|
|
||||||
val addressDbsF: Future[Vector[AddressDb]] = {
|
val addressDbsF: Future[Vector[AddressDb]] = {
|
||||||
getAddressDbs(outputsWithIndex.map(_.output.scriptPubKey).toVector)
|
getAddressDbs(spks)
|
||||||
}
|
}
|
||||||
|
|
||||||
val addressDbWithOutputF = for {
|
val addressDbWithOutputF = for {
|
||||||
addressDbs <- addressDbsF
|
addressDbs <- addressDbsF
|
||||||
} yield matchAddressDbWithOutputs(addressDbs, outputsWithIndex.toVector)
|
} yield {
|
||||||
|
if (addressDbs.isEmpty) {
|
||||||
|
logger.warn(
|
||||||
|
s"Found zero addresses in the database to match an output we have a script for, txid=${transaction.txIdBE.hex} outputs=${outputsWithIndex}")
|
||||||
|
}
|
||||||
|
matchAddressDbWithOutputs(addressDbs, outputsWithIndex.toVector)
|
||||||
|
}
|
||||||
|
|
||||||
val nested = for {
|
val nested = for {
|
||||||
addressDbWithOutput <- addressDbWithOutputF
|
addressDbWithOutput <- addressDbWithOutputF
|
||||||
|
Loading…
Reference in New Issue
Block a user