Skip to content

Collapse CollateralFederationManager and FederationManager Part #1#272

Merged
fassadlr merged 2 commits intostratisproject:masterfrom
fassadlr:collapse-fedmanager
Dec 11, 2020
Merged

Collapse CollateralFederationManager and FederationManager Part #1#272
fassadlr merged 2 commits intostratisproject:masterfrom
fassadlr:collapse-fedmanager

Conversation

@fassadlr
Copy link
Contributor

This is the first PR, just to do the move. After this we will do more cleanup of various daemons and add rules back etc.

var collateralFederationMember = new CollateralFederationMember(minerKey.PubKey, false, joinRequest.CollateralAmount, request.CollateralAddress);

byte[] federationMemberBytes = (this.network.Consensus.ConsensusFactory as CollateralPoAConsensusFactory).SerializeFederationMember(collateralFederationMember);
Poll poll = this.votingManager.GetFinishedPolls().FirstOrDefault(x => x.IsExecuted &&
Copy link
Contributor

@quantumagi quantumagi Dec 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps change this to order by poll height and take the last match with LastOrDefault. Same for the similar code in JoinFederationRequestMonitor.

Copy link
Contributor

@quantumagi quantumagi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one comment/change.

@fassadlr fassadlr merged commit 5527fb2 into stratisproject:master Dec 11, 2020
@fassadlr fassadlr deleted the collapse-fedmanager branch December 12, 2020 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants