mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Avoid repeated (de)serialization when syncing
This commit is contained in:
parent
b747e836c8
commit
b044d03a51
13 changed files with 80 additions and 69 deletions
|
@ -129,7 +129,7 @@ static void test(test_t t, uint64_t blocks)
|
|||
cryptonote::block b;
|
||||
b.major_version = 1;
|
||||
b.minor_version = 1;
|
||||
bc->get_db().add_block(b, 300000, 300000, bc->get_db().height(), bc->get_db().height(), {});
|
||||
bc->get_db().add_block(std::make_pair(b, ""), 300000, 300000, bc->get_db().height(), bc->get_db().height(), {});
|
||||
if (!bc->update_next_cumulative_weight_limit())
|
||||
{
|
||||
fprintf(stderr, "Failed to update cumulative weight limit 1\n");
|
||||
|
@ -163,7 +163,7 @@ static void test(test_t t, uint64_t blocks)
|
|||
cryptonote::block b;
|
||||
b.major_version = 10;
|
||||
b.minor_version = 10;
|
||||
bc->get_db().add_block(std::move(b), w, ltw, bc->get_db().height(), bc->get_db().height(), {});
|
||||
bc->get_db().add_block(std::make_pair(std::move(b), ""), w, ltw, bc->get_db().height(), bc->get_db().height(), {});
|
||||
|
||||
if (!bc->update_next_cumulative_weight_limit())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue