31 std::shared_ptr< graphene::debug_witness_plugin::debug_witness_plugin >
get_plugin();
51 ilog(
"Loading ${n} from block_database ${fn}", (
"n", count)(
"fn", src_filename) );
54 uint32_t first_block = db->head_block_num()+1;
55 for( uint32_t i=0; i<count; i++ )
60 wlog(
"Block database ${fn} only contained ${i} of ${n} requested blocks", (
"i", i)(
"n", count)(
"fn", src_filename) );
65 db->push_block( *block );
69 elog(
"Got exception pushing block ${bn} : ${bid} (${i} of ${n})", (
"bn", block->
block_num())(
"bid", block->
id())(
"i", i)(
"n", count) );
73 ilog(
"Completed loading block_database successfully" );
87 for( uint32_t i=0; i<count; i++ )
89 graphene::chain::witness_id_type scheduled_witness = db->get_scheduled_witness( 1 );
92 if( scheduled_key != debug_public_key )
94 ilog(
"Modified key for witness ${w}", (
"w", scheduled_witness) );
96 update(
"_action",
"update")(
"id", scheduled_witness)(
"signing_key", debug_public_key);
97 db->debug_update( update );
106 db->debug_update( update );
116 get_plugin()->set_json_object_stream( filename );
128 my = std::make_shared< detail::debug_api_impl >(app);
133 my->debug_push_blocks( source_filename, count );
138 my->debug_generate_blocks( debug_key, count );
143 my->debug_update_object( update );
148 my->debug_stream_json_objects( filename );
153 my->debug_stream_json_objects_flush();