forked from lthn/blockchain
attempt to fix broken PoS relay
This commit is contained in:
parent
67e900ec15
commit
e8e6c83fa8
1 changed files with 8 additions and 1 deletions
|
|
@ -258,6 +258,11 @@ namespace currency
|
|||
}
|
||||
|
||||
//pre-validate block here, and propagate it to network asap to avoid latency of handling big block (tx flood)
|
||||
//########################################################
|
||||
/*
|
||||
problem with prevalidation: in case of pre_validate_block() is passed but handle_incoming_tx() is failed
|
||||
network got spammed with notifications about this broken block and then connections got closed.
|
||||
temporary disabled to more investigation
|
||||
bool prevalidate_relayed = false;
|
||||
if (m_core.pre_validate_block(b, bvc, block_id) && bvc.m_added_to_main_chain)
|
||||
{
|
||||
|
|
@ -266,6 +271,8 @@ namespace currency
|
|||
relay_block(arg, context);
|
||||
prevalidate_relayed = true;
|
||||
}
|
||||
*/
|
||||
//########################################################
|
||||
|
||||
//now actually process block
|
||||
for(auto tx_blob_it = arg.b.txs.begin(); tx_blob_it!=arg.b.txs.end();tx_blob_it++)
|
||||
|
|
@ -297,7 +304,7 @@ namespace currency
|
|||
|
||||
if (bvc.m_added_to_main_chain || (bvc.added_to_altchain && bvc.height_difference < 2))
|
||||
{
|
||||
if (!prevalidate_relayed)
|
||||
if (true/*!prevalidate_relayed*/)
|
||||
{
|
||||
// pre-validation failed prevoiusly, but complete check was success, not an alternative block
|
||||
++arg.hop;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue