Skip to content

Commit

Permalink
fix: node without ptm can not synchronize privacy block
Browse files Browse the repository at this point in the history
  • Loading branch information
zengchen221 committed Mar 3, 2021
1 parent a7d9b01 commit ad53fe9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions consensus/dpos/dpos_impl_testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,13 @@ func (dps *DPoS) processPrivateBlocks() {

case bs := <-dps.privateRecvBlocks:
if bs.Block.IsPrivate() {
recvReq := &topic.EventPrivacyRecvReqMsg{EnclaveKey: bs.Block.GetData(), ReqData: bs, RspChan: dps.privateRecvRspCh}
dps.eb.Publish(topic.EventPrivacySendReq, recvReq)
if dps.cfg.Privacy.Enable {
recvReq := &topic.EventPrivacyRecvReqMsg{EnclaveKey: bs.Block.GetData(), ReqData: bs, RspChan: dps.privateRecvRspCh}
dps.eb.Publish(topic.EventPrivacySendReq, recvReq)
} else {
rspMsg := &topic.EventPrivacyRecvRspMsg{ReqData: bs}
dps.privateRecvRspCh <- rspMsg
}
}

case recvRsp := <-dps.privateRecvRspCh:
Expand Down

0 comments on commit ad53fe9

Please sign in to comment.