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 8a8fb4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 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

0 comments on commit 8a8fb4b

Please sign in to comment.