Commit 00923bd6 authored by Sergei Zubov's avatar Sergei Zubov

Fix input checking in consensus

parent da2827b5
......@@ -79,13 +79,12 @@ namespace Stratis.Bitcoin.Features.Consensus.Rules.CommonRules
var txData = new PrecomputedTransactionData(tx);
for (int inputIndex = 0; inputIndex < tx.Inputs.Count; inputIndex++)
{
if (tx.Inputs[inputIndex].IsChangePointer())
continue;
this.Parent.PerformanceCounter.AddProcessedInputs(1);
TxIn input = tx.Inputs[inputIndex];
int inputIndexCopy = inputIndex;
TxOut txout = view.GetOutputFor(input);
TxOut txout = input.IsChangePointer()
? tx.Outputs[input.PrevOut.N]
: view.GetOutputFor(input);
var checkInput = new Task<bool>(() =>
{
var checker = new TransactionChecker(tx, inputIndexCopy, txout.Value, txData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment