beacon: Fix Beacon Block Response in Simulator (#394)

This commit is contained in:
Raul Jordan 2018-08-12 13:20:30 -05:00 committed by GitHub
parent 11397ba9a1
commit 2060d2934e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,7 +175,8 @@ func (sim *Simulator) run(delayChan <-chan time.Time, done <-chan struct{}) {
} }
log.Infof("Responding to full block request for hash: 0x%x", h) log.Infof("Responding to full block request for hash: 0x%x", h)
// Sends the full block body to the requester. // Sends the full block body to the requester.
sim.p2p.Send(block.Proto(), msg.Peer) res := &pb.BeaconBlockResponse{Block: block.Proto()}
sim.p2p.Send(res, msg.Peer)
case msg := <-sim.crystallizedStateRequestChan: case msg := <-sim.crystallizedStateRequestChan:
data, ok := msg.Data.(*pb.CrystallizedStateRequest) data, ok := msg.Data.(*pb.CrystallizedStateRequest)