Files
tss/eddsa/resharing/round_5_new_step_3.go
2025-08-02 15:20:14 -05:00

51 lines
1.1 KiB
Go

// Copyright © 2019 Binance
//
// This file is part of Binance. The full Binance copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
package resharing
import (
"errors"
"github.com/luxfi/tss/v2/tss"
)
func (round *round5) Start() *tss.Error {
if round.started {
return round.WrapError(errors.New("round already started"))
}
round.number = 5
round.started = true
round.allOldOK()
round.allNewOK()
if round.IsNewCommittee() {
// for this P: SAVE data
round.save.BigXj = round.temp.newBigXjs
round.save.ShareID = round.PartyID().KeyInt()
round.save.Xi = round.temp.newXi
round.save.Ks = round.temp.newKs
} else if round.IsOldCommittee() {
round.input.Xi.SetInt64(0)
}
round.end <- round.save
return nil
}
func (round *round5) CanAccept(msg tss.ParsedMessage) bool {
return false
}
func (round *round5) Update() (bool, *tss.Error) {
return false, nil
}
func (round *round5) NextRound() tss.Round {
return nil // both committees are finished!
}