Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
destream-blockchain
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
destream-blockchain
Commits
00923bd6
Commit
00923bd6
authored
6 years ago
by
Sergei Zubov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix input checking in consensus
parent
da2827b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
DeStreamCoinviewRule.cs
...tures.Consensus/Rules/CommonRules/DeStreamCoinviewRule.cs
+3
-4
No files found.
Sources/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/DeStreamCoinviewRule.cs
View file @
00923bd6
...
@@ -79,13 +79,12 @@ namespace Stratis.Bitcoin.Features.Consensus.Rules.CommonRules
...
@@ -79,13 +79,12 @@ namespace Stratis.Bitcoin.Features.Consensus.Rules.CommonRules
var
txData
=
new
PrecomputedTransactionData
(
tx
);
var
txData
=
new
PrecomputedTransactionData
(
tx
);
for
(
int
inputIndex
=
0
;
inputIndex
<
tx
.
Inputs
.
Count
;
inputIndex
++)
for
(
int
inputIndex
=
0
;
inputIndex
<
tx
.
Inputs
.
Count
;
inputIndex
++)
{
{
if
(
tx
.
Inputs
[
inputIndex
].
IsChangePointer
())
continue
;
this
.
Parent
.
PerformanceCounter
.
AddProcessedInputs
(
1
);
this
.
Parent
.
PerformanceCounter
.
AddProcessedInputs
(
1
);
TxIn
input
=
tx
.
Inputs
[
inputIndex
];
TxIn
input
=
tx
.
Inputs
[
inputIndex
];
int
inputIndexCopy
=
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
checkInput
=
new
Task
<
bool
>(()
=>
{
{
var
checker
=
new
TransactionChecker
(
tx
,
inputIndexCopy
,
txout
.
Value
,
txData
);
var
checker
=
new
TransactionChecker
(
tx
,
inputIndexCopy
,
txout
.
Value
,
txData
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment