Test fee amount only for transactions with inputs
This commit is contained in:
parent
e08e923ee8
commit
d67eae31bb
@ -334,11 +334,13 @@ func verifyAddresses(t *testing.T, d *db.RocksDB, h *TestHandler) {
|
|||||||
tx.Txid, taInfo.valOutSat.String(), txInfo.valOutSat.String())
|
tx.Txid, taInfo.valOutSat.String(), txInfo.valOutSat.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
treshold := "0.0001"
|
if len(txInfo.inputs) > 0 {
|
||||||
fee := new(big.Int).Sub(&taInfo.valInSat, &taInfo.valOutSat)
|
treshold := "0.0001"
|
||||||
if strings.Compare(parser.AmountToDecimalString(fee), treshold) > 0 {
|
fee := new(big.Int).Sub(&taInfo.valInSat, &taInfo.valOutSat)
|
||||||
t.Errorf("Tx %s: suspicious amounts: input ∑ [%s] - output ∑ [%s] > %s",
|
if strings.Compare(parser.AmountToDecimalString(fee), treshold) > 0 {
|
||||||
tx.Txid, taInfo.valInSat.String(), taInfo.valOutSat.String(), treshold)
|
t.Errorf("Tx %s: suspicious amounts: input ∑ [%s] - output ∑ [%s] > %s",
|
||||||
|
tx.Txid, taInfo.valInSat.String(), taInfo.valOutSat.String(), treshold)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user