Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/chasers/chaser_transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void chaser_transaction::do_reorganized(header_t link) NOEXCEPT
}

// Block txs are already silent indexed.
if (!query.set_pooled(fk, *tx, ctx))
if (!query.set_pooled(fk, *tx, ctx, ctx.timestamp))
{
fault(error::transaction2);
return;
Expand Down Expand Up @@ -216,6 +216,7 @@ void chaser_transaction::do_submit(const transactions_cptr& txs, bool test,
}

// Parents precede children, so a parent is archived before it is resolved.
const auto time = network::unix_time();
for (index = zero; index < txs->size(); ++index)
{
if (stored.at(index))
Expand All @@ -234,7 +235,7 @@ void chaser_transaction::do_submit(const transactions_cptr& txs, bool test,

if (!pooled)
{
if (!query.set_pooled(link, tx, pool_))
if (!query.set_pooled(link, tx, pool_, time))
{
handler(fault(error::transaction2), index);
return;
Expand Down Expand Up @@ -368,7 +369,7 @@ code chaser_transaction::fill(database::tx_link& out,
if (const auto ec = validate(tx, ctx))
return ec;

if (!query.set_pooled(out, tx, ctx))
if (!query.set_pooled(out, tx, ctx, ctx.timestamp))
return fault(error::transaction2);

if (ctx.height >= query.silent_start_height() &&
Expand All @@ -391,7 +392,7 @@ code chaser_transaction::fill(database::tx_link& out,
const auto coinbase = tx.is_coinbase();
if (!pooled && !coinbase)
{
if (!query.set_pooled(out, tx, ctx))
if (!query.set_pooled(out, tx, ctx, ctx.timestamp))
return fault(error::transaction2);

if (ctx.height >= query.silent_start_height() &&
Expand Down
4 changes: 4 additions & 0 deletions test/chasers/chaser_transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ BOOST_FIXTURE_TEST_CASE(chaser_transaction__reorganized__unpooled_block_tx__pool
node_.notify(node::error::success, chases::reorganized{ link });
BOOST_REQUIRE(pooled(stored));
BOOST_REQUIRE(!query_.is_pooled(query_.to_tx(coinbase.hash(false))));

database::table::pool::record record{};
BOOST_REQUIRE(store_.pool.get(store_.pool.first(stored), record));
BOOST_REQUIRE_EQUAL(record.time, header.timestamp());
}

// submit_compact
Expand Down
Loading