Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1063 from helium/pevm/fix-block-regossip
Browse files Browse the repository at this point in the history
add a fall-back path for getting v1 gossip while running v2 code
  • Loading branch information
evanmcc committed Nov 2, 2021
2 parents 36ae538 + fd4762d commit e424fcf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/handlers/blockchain_gossip_handler.erl
Expand Up @@ -193,8 +193,10 @@ regossip_block(Block, SwarmTID) ->
%% this is awful but safe
regossip_block(Block, height, hash, SwarmTID);
2 ->
%% should be impossible to hit this?
{error, bad_gossip_version}
%% this is not super efficient but the cost should tail off over time.
Height = blockchain_block:height(Block),
Hash = blockchain_block:hash_block(Block),
regossip_block(Block, Height, Hash, SwarmTID)
end.

regossip_block(Block, Height, Hash, SwarmTID) ->
Expand Down

0 comments on commit e424fcf

Please sign in to comment.