diff options
Diffstat (limited to 'simulation/fake-network.go')
-rw-r--r-- | simulation/fake-network.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/simulation/fake-network.go b/simulation/fake-network.go index 99c504a..fc8764a 100644 --- a/simulation/fake-network.go +++ b/simulation/fake-network.go @@ -93,6 +93,16 @@ func (n *FakeNetwork) BroadcastBlock(block *types.Block) { } } +// BroadcastNotaryAck broadcast notaryAck into the network. +func (n *FakeNetwork) BroadcastNotaryAck(notaryAck *types.NotaryAck) { + n.endpointMutex.Lock() + defer n.endpointMutex.Unlock() + + for endpoint := range n.endpoints { + n.Send(endpoint, notaryAck) + } +} + // DeliverBlocks sends blocks to peerServer. func (n *FakeNetwork) DeliverBlocks(blocks BlockList) { // TODO(jimmy-dexon): Implement this method. |