mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-10 16:16:47 +00:00

* [NOD-652] Add selectedTip and getSelectedTip messages * [NOD-652] Remove peerSyncState.isSelectedTipKnown * [NOD-652] Do nothing on OnSelectedTip if the peer selected tip hasn't changed * [NOD-652] Handle selected tip message with block handler * [NOD-652] Add comments * [NOD-652] go mod tidy * [NOD-652] Fix TestVersion * [NOD-652] Use dag.AdjustedTime instead of dag.timeSource.AdjustedTime * [NOD-652] Create shouldQueryPeerSelectedTips and queueMsgGetSelectedTip functions * [NOD-652] Change selectedTip to selectedTipHash where needed * [NOD-652] add minDAGTimeDelay constant * [NOD-652] add comments * [NOD-652] Fix names and comments * [NOD-652] Put msg.reply push in the right place * [NOD-652] Fix comments and names
12 lines
254 B
Go
12 lines
254 B
Go
package p2p
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/wire"
|
|
)
|
|
|
|
// OnGetSelectedTip is invoked when a peer receives a getSelectedTip kaspa
|
|
// message.
|
|
func (sp *Peer) OnGetSelectedTip() {
|
|
sp.QueueMessage(wire.NewMsgSelectedTip(sp.selectedTipHash()), nil)
|
|
}
|