Forked from
DistributedSystems4Students / FUCoin
61 commits behind the upstream repository.
-
Simon Könnecke authoredSimon Könnecke authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ActionStoreOrUpdate.java 617 B
package fucoin.actions.persist;
import akka.actor.ActorRef;
import akka.actor.UntypedActorContext;
import fucoin.wallet.AbstractWallet;
import fucoin.wallet.WalletImpl;
//Used to push the state of my/a wallet to another participant
public class ActionStoreOrUpdate extends Persist {
public final AbstractWallet w;
public ActionStoreOrUpdate(AbstractWallet w) {
this.w = w;
}
@Override
protected void onAction(ActorRef sender, ActorRef self,
UntypedActorContext context, AbstractWallet wallet) {
wallet.backedUpNeighbors.put(w.getName(), w);
}
}