Skip to content

pjc0247/minichain_51attack_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

minichain_51attack_demo

an implementation of bad node that denies every blocks generated by pure nodes.

How it works

// List of bad friends.
private HashSet<string> badNodeAddrs = new HashSet<string>();
        
protected override void OnNewBlock(Peer sender, PktBroadcastNewBlock pkt)
{
  // Check the block is mined by alias
  if (badNodeAddrs.Contains(pkt.block.minerAddr) == false) return;

  base.OnNewBlock(sender, pkt);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages