Fix: do not process inputs without txid in mempool

This commit is contained in:
Martin Boehm 2022-09-01 08:50:20 +02:00 committed by Martin
parent 0bb8f69e60
commit abb8b9dc16

View File

@ -61,6 +61,10 @@ func (m *MempoolBitcoinType) getInputAddress(payload *chanInputPayload) *addrInd
var addrDesc AddressDescriptor
var value *big.Int
vin := &payload.tx.Vin[payload.index]
if vin.Txid == "" {
// cannot get address from empty input txid (for example in Litecoin mweb)
return nil
}
if m.AddrDescForOutpoint != nil {
addrDesc, value = m.AddrDescForOutpoint(Outpoint{vin.Txid, int32(vin.Vout)})
}