AntelopeIO / spring

C++ implementation of the Antelope protocol with Savanna consensus
Other
10 stars 5 forks source link

Do not unwind validated blocks on interrupt #1021

Closed heifner closed 1 week ago

heifner commented 2 weeks ago

Noticed the following warning.

^Cinfo  2024-11-08T13:04:40.741 nodeos    main.cpp:193                  operator()           ] appbase quit called
info  2024-11-08T13:04:40.741 nodeos    controller.cpp:4536           interrupt_transactio ] Interrupting apply block
info  2024-11-08T13:04:40.742 nodeos    controller.cpp:3820           apply_block          ] Interrupt of trx id: e6175b672d97e3f0110d70466c6c65d27f8cd2a5fc344d7efbe5a3e7c59090f5
info  2024-11-08T13:04:40.742 nodeos    controller.cpp:4464           operator()           ] interrupt while applying block 398678346 : 17c3594aee3d06f3d51e01c5afbe6c18d3216298d870cdfb9c79264cdcb6049d
warn  2024-11-08T13:04:40.754 nodeos    controller.cpp:4385           apply_blocks         ] 3030000 block_validate_exception: Block exception
attempt to pop beyond last irreversible block
    {}
    nodeos  controller.cpp:1165 pop_block

When interrupting a transaction via ctrl-c, do not attempt to unwind the branch. Also no need to attempt to discard a bad fork if not actually switching forks.

Related to #993 Resolves #1022

ericpassmore commented 1 week ago

Note:start category: System Stability component: Internal summary: Do not unwind validated blocks on interrupt. Note:end