コード例 #1
0
func (c *AddFederatedServer) UpdateState(state interfaces.IState) error {
	state.AddFedServer(c.DBHeight, c.IdentityChainID)
	authorityDeltaString := fmt.Sprintf("AdminBlock (AddFedMsg DBHt: %d) \n ^ %s", c.DBHeight, c.IdentityChainID.String()[5:10])
	state.AddAuthorityDelta(authorityDeltaString)
	state.UpdateAuthorityFromABEntry(c)
	return nil
}
コード例 #2
0
func (c *RemoveFederatedServer) UpdateState(state interfaces.IState) error {
	if len(state.GetFedServers(c.DBHeight)) != 0 {
		state.RemoveFedServer(c.DBHeight, c.IdentityChainID)
	}
	if state.GetOut() {
		state.Println(fmt.Sprintf("Removed Federated Server: %x", c.IdentityChainID.Bytes()[:4]))
	}
	authorityDeltaString := fmt.Sprintf("AdminBlock (RemoveFedMsg DBHt: %d) \n v %s", c.DBHeight, c.IdentityChainID.String()[5:10])
	state.AddAuthorityDelta(authorityDeltaString)
	state.UpdateAuthorityFromABEntry(c)
	return nil
}
コード例 #3
0
func (c *AddFederatedServerSigningKey) UpdateState(state interfaces.IState) error {
	state.UpdateAuthorityFromABEntry(c)
	return nil
}
コード例 #4
0
func (c *AddReplaceMatryoshkaHash) UpdateState(state interfaces.IState) error {
	state.UpdateAuthorityFromABEntry(c)
	return nil
}