Fix FeeUnit match not being exhaustive (#1472)

This commit is contained in:
Ben Carman 2020-05-27 06:06:06 -05:00 committed by GitHub
parent 4871410306
commit bbff8af1be
2 changed files with 4 additions and 4 deletions

View File

@ -7,6 +7,7 @@ import org.bitcoins.core.p2p.{ProtocolVersion, _}
import org.bitcoins.core.protocol.CompactSizeUInt
import org.bitcoins.core.wallet.fee.{
SatoshisPerByte,
SatoshisPerKW,
SatoshisPerKiloByte,
SatoshisPerVirtualByte
}
@ -35,7 +36,7 @@ object ControlMessageGenerator {
} yield fee match {
case fee: SatoshisPerByte => FeeFilterMessage(fee)
case fee: SatoshisPerKiloByte => FeeFilterMessage(fee)
case SatoshisPerVirtualByte(_) =>
case SatoshisPerVirtualByte(_) | SatoshisPerKW(_) =>
throw new RuntimeException(s"We cannot end up here")
}
}

View File

@ -9,12 +9,11 @@ import org.bitcoins.core.crypto.ExtPublicKey
import org.bitcoins.core.currency._
import org.bitcoins.core.hd.{HDAccount, HDCoin, HDPurposes}
import org.bitcoins.core.protocol.BitcoinAddress
import org.bitcoins.core.protocol.blockchain.BlockHeader
import org.bitcoins.core.protocol.script.ScriptPubKey
import org.bitcoins.core.protocol.transaction._
import org.bitcoins.core.script.constant.ScriptConstant
import org.bitcoins.core.script.control.OP_RETURN
import org.bitcoins.core.util.{BitcoinScriptUtil, FutureUtil}
import org.bitcoins.core.util.BitcoinScriptUtil
import org.bitcoins.core.wallet.builder.{
NonInteractiveWithChangeFinalizer,
RawTxBuilderWithFinalizer,
@ -41,7 +40,7 @@ import org.bitcoins.wallet.models.{SpendingInfoDb, _}
import scodec.bits.ByteVector
import scala.concurrent.{ExecutionContext, Future}
import scala.util.{Failure, Success, Try}
import scala.util.{Failure, Success}
abstract class Wallet
extends WalletApi