When a node receives an invalid transaction or block, as far as I know, it bans the sender for 24 hours. However, I didn't exactly get which sender is banned. Is it the neighbor node that provides the data to this node, or is it the creator of the data (transaction or block)?

1 Answer 1


There is no way to know which node created a transaction or block, unless they publish that information themselves. Nodes should not have an identity that leaks into transaction or block data.

So banning for relaying invalid blocks or transactions always applies to the peer that gave you the information, based on their IP address. The protocol requires you to validate information before relaying, so you are in violation whenever you pass on invalid data.

  • A node is banned for 24 hours or forever? I checked Misbehaving() function which makes state->fShouldBan = true;. But I could not find any other function that makes state->fShouldBan = false;. If it is forever, I guess the node also removes the misbehaving peer from its neighbor list, right? May 30, 2017 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.