Coverage Summary for Class: BtcLockSenderProvider (co.rsk.peg.btcLockSender)

Class Class, % Method, % Line, %
BtcLockSenderProvider 0% (0/1) 0% (0/2) 0% (0/16)


1 package co.rsk.peg.btcLockSender; 2  3 import co.rsk.bitcoinj.core.BtcTransaction; 4  5 import java.util.Optional; 6  7 public class BtcLockSenderProvider { 8  9  public Optional<BtcLockSender> tryGetBtcLockSender(BtcTransaction tx) { 10  if (tx == null) { 11  return Optional.empty(); 12  } 13  14  BtcLockSender result; 15  16  result = new P2pkhBtcLockSender(); 17  if (result.tryParse(tx)) { 18  return Optional.of(result); 19  } 20  21  result = new P2shP2wpkhBtcLockSender(); 22  if (result.tryParse(tx)) { 23  return Optional.of(result); 24  } 25  26  result = new P2shMultisigBtcLockSender(); 27  if (result.tryParse(tx)) { 28  return Optional.of(result); 29  } 30  31  result = new P2shP2wshBtcLockSender(); 32  if (result.tryParse(tx)) { 33  return Optional.of(result); 34  } 35  36  return Optional.empty(); 37  } 38 }