Skip to content

Commit

Permalink
fix(bpos): not support CRInfoMultiSignVersion before ChangeViewV1Height
Browse files Browse the repository at this point in the history
  • Loading branch information
Houshoupei84 committed Oct 19, 2023
1 parent 935a427 commit c1bf61e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
9 changes: 4 additions & 5 deletions core/transaction/registercrtransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ func (t *RegisterCRTransaction) HeightVersionCheck() error {
"before CRSchnorrStartHeight", t.TxType().Name()))
}
case payload.CRInfoMultiSignVersion:
//if blockHeight < chainParams.CRSchnorrStartHeight {
// return errors.New(fmt.Sprintf("not support %s transaction "+
// "before CRSchnorrStartHeight", t.TxType().Name()))
//}
log.Warnf("todo add one height for cr multisign")
if blockHeight < chainParams.DPoSConfiguration.ChangeViewV1Height {
return errors.New(fmt.Sprintf("not support %s transaction CRInfoMultiSignVersion"+
"before ChangeViewV1Height", t.TxType().Name()))
}
default:
return errors.New(fmt.Sprintf("invalid payload version, "+
"%s transaction", t.TxType().Name()))
Expand Down
5 changes: 0 additions & 5 deletions dpos/arbitrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func (a *Arbitrator) OnSidechainIllegalEvidenceReceived(
}

func (a *Arbitrator) OnBlockReceived(b *types.Block, confirmed bool) {
log.Info("####OnBlockReceived begin b.Hash()", b.Hash())
if !a.cfg.Server.IsCurrent() {
return
}
Expand All @@ -217,11 +216,7 @@ func (a *Arbitrator) OnBlockReceived(b *types.Block, confirmed bool) {
return
}
}
log.Info("####OnBlockReceived before PostBlockReceivedTask b.Hash()", b.Hash())

a.network.PostBlockReceivedTask(b, confirmed)
log.Info("####OnBlockReceived end b.Hash()", b.Hash())

}

func (a *Arbitrator) OnConfirmReceived(p *mempool.ConfirmInfo) {
Expand Down
1 change: 0 additions & 1 deletion dpos/manager/dposmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ func (d *DPOSManager) ProcessHigherBlock(b *types.Block) {
// return
//}

//d.handler.DealPrecociousProposals()
if !d.consensus.IsOnDuty() {
log.Info("[ProcessHigherBlock] broadcast inv and try start new consensus")
d.network.BroadcastMessage(dmsg.NewInventory(b.Header.Previous))
Expand Down

0 comments on commit c1bf61e

Please sign in to comment.