mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-19 05:33:44 +01:00
Added getFromWallet method to StoredPaymentChannelServerStates
This commit is contained in:
parent
a659c68162
commit
500db4b43f
@ -89,6 +89,12 @@ public class StoredPaymentChannelServerStates implements WalletExtension {
|
||||
this.broadcasterFuture.set(checkNotNull(broadcaster));
|
||||
}
|
||||
|
||||
/** Returns this extension from the given wallet, or null if no such extension was added. */
|
||||
@Nullable
|
||||
public static StoredPaymentChannelServerStates getFromWallet(Wallet wallet) {
|
||||
return (StoredPaymentChannelServerStates) wallet.getExtensions().get(EXTENSION_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Closes the given channel using {@link ServerConnectionEventHandler#closeChannel()} and
|
||||
* {@link PaymentChannelV1ServerState#close()} to notify any connected client of channel closure and to complete and
|
||||
|
Loading…
Reference in New Issue
Block a user