Changed implementation of compact blocks from compactMode property to compactModeTo and compactModeFrom.
Created a highBW Peer List to incorporate highBW compact blocks sending peers.
Created function setHighBWPeer that checks if the peer is inbound or outbound, effectively responding with appropriate compactBlock request. (HighBW or LowBW).
Created function removeHighBWPeer to remove a highBW peer from the peer list.
Added compact blocks constants - COMPACT_BLOCKS_HIGHBW and COMPACT_BLOCKS_LOWBW in common.js to change peer.sendCompact nature.
Hey @pinheadmz, here's the implementation, (I also added some comments that I'll remove later). Let me know if the implementation is ok, so that I can move over to testing 😄. Thanks.
Implementation
compactMode
property tocompactModeTo
andcompactModeFrom
.setHighBWPeer
that checks if the peer isinbound
oroutbound
, effectively responding with appropriatecompactBlock
request. (HighBW or LowBW).removeHighBWPeer
to remove a highBW peer from the peer list.COMPACT_BLOCKS_HIGHBW
andCOMPACT_BLOCKS_LOWBW
incommon.js
to changepeer.sendCompact
nature.