Newer
Older
package fucoin.actions.persist;
import akka.actor.ActorRef;
import akka.actor.UntypedActorContext;
Simon Könnecke
committed
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;
Simon Könnecke
committed
public ActionStoreOrUpdate(AbstractWallet w) {
this.w = w;
}
Simon Könnecke
committed
@Override
protected void onAction(ActorRef sender, ActorRef self,
UntypedActorContext context, AbstractWallet wallet) {
wallet.backedUpNeighbors.put(w.getName(), w);
Simon Könnecke
committed
}