Skip to content
Snippets Groups Projects
Forked from DistributedSystems4Students / FUCoin
61 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ActionJoin.java 568 B
package fucoin.actions.join;

import akka.actor.ActorRef;
import akka.actor.UntypedActorContext;
import fucoin.wallet.AbstractNode;

//Used to join the network (a pre known participant/WalletImpl must be known)
public class ActionJoin extends GeneralAction {

    @Override
    protected void onAction(ActorRef sender, ActorRef self,
                            UntypedActorContext context, AbstractNode node) {
        ActionJoinAnswer aja = new ActionJoinAnswer();
        aja.someNeighbors.putAll(node.getKnownNeighbors());
        sender.tell(aja, self);
    }

}