Skip to content

Commit 37f728f

Browse files
authored
Merge pull request #708 from evoskuil/master
Use link vs. height with set_prevouts() stub, add neutrino to confirm.
2 parents a84e314 + 498542f commit 37f728f

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/chasers/chaser_confirm.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void chaser_confirm::do_validated(height_t height) NOEXCEPT
175175
do_bump(height);
176176
}
177177

178-
// TODO: This is a simplified variant of the full implementation below.
178+
// TODO: This is simplified single thread variant of full implementation below.
179179
// This variant doesn't implement the relative work check and instead confirms
180180
// one block at a time, just like validation.
181181
void chaser_confirm::do_bump(height_t) NOEXCEPT
@@ -208,9 +208,10 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT
208208
return;
209209
}
210210

211-
/////////////////////////////////////////
211+
//////////////////////////////////////////
212212
// Confirmation query.
213-
/////////////////////////////////////////
213+
// This will pull from new prevouts table.
214+
//////////////////////////////////////////
214215
if ((ec = query.block_confirmable(link)))
215216
{
216217
if (ec == database::error::integrity)
@@ -283,7 +284,12 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT
283284
return;
284285
}
285286

286-
update_neutrino(link);
287+
if (!update_neutrino(link))
288+
{
289+
fault(error::confirm10);
290+
return;
291+
}
292+
287293
set_position(height);
288294
}
289295
}

src/chasers/chaser_validate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ void chaser_validate::validate_block(const header_link& link) NOEXCEPT
240240
{
241241
ec = error::validate5;
242242
}
243-
else if (!query.set_prevouts(ctx.height, *block))
243+
else if (!query.set_prevouts(link, *block))
244244
{
245245
ec = error::validate6;
246246
}

0 commit comments

Comments
 (0)