mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-20 02:11:40 +01:00
Cleanup: Got rid of dummy variables (they are hardcoded for backwards compatibility now), replaced JsArray(vector.map(Json.toJson(_)) pattern with Json.toJson(vector.map), and ran scalafmt
This commit is contained in:
parent
3630bf1b00
commit
7f0412a784
@ -361,56 +361,57 @@ case class EstimateSmartFeeResult(
|
||||
blocks: Int
|
||||
) extends NetworkResult
|
||||
|
||||
case class GetMemoryInfoResult (locked: MemoryManager) extends NetworkResult
|
||||
case class GetMemoryInfoResult(locked: MemoryManager) extends NetworkResult
|
||||
|
||||
case class MemoryManager(
|
||||
used: Int,
|
||||
free: Int,
|
||||
total: Int,
|
||||
locked: Int,
|
||||
chunks_used: Int,
|
||||
chunks_free: Int
|
||||
) extends NetworkResult
|
||||
used: Int,
|
||||
free: Int,
|
||||
total: Int,
|
||||
locked: Int,
|
||||
chunks_used: Int,
|
||||
chunks_free: Int
|
||||
) extends NetworkResult
|
||||
|
||||
case class GetMemPoolResult(transactionid: MemPoolTransaction) extends NetworkResult
|
||||
case class GetMemPoolResult(transactionid: MemPoolTransaction)
|
||||
extends NetworkResult
|
||||
|
||||
case class MemPoolTransaction(
|
||||
size: Int,
|
||||
fee: Option[Bitcoins],
|
||||
modifiedfee: Option[Bitcoins],
|
||||
time: UInt32,
|
||||
height: Int,
|
||||
descendantcount: Int,
|
||||
descendantsize: Int,
|
||||
descendantfees: Option[Bitcoins],
|
||||
ancestorcount: Int,
|
||||
ancestorsize: Int,
|
||||
ancestorfees: Option[Bitcoins],
|
||||
wtxid: Transaction,
|
||||
fees: TransactionFees,
|
||||
depends: Vector[DoubleSha256Digest],
|
||||
spentby: Vector[DoubleSha256Digest]
|
||||
) extends NetworkResult
|
||||
size: Int,
|
||||
fee: Option[Bitcoins],
|
||||
modifiedfee: Option[Bitcoins],
|
||||
time: UInt32,
|
||||
height: Int,
|
||||
descendantcount: Int,
|
||||
descendantsize: Int,
|
||||
descendantfees: Option[Bitcoins],
|
||||
ancestorcount: Int,
|
||||
ancestorsize: Int,
|
||||
ancestorfees: Option[Bitcoins],
|
||||
wtxid: Transaction,
|
||||
fees: TransactionFees,
|
||||
depends: Vector[DoubleSha256Digest],
|
||||
spentby: Vector[DoubleSha256Digest]
|
||||
) extends NetworkResult
|
||||
|
||||
case class TransactionFees(
|
||||
base: Bitcoins,
|
||||
modified: Bitcoins,
|
||||
ancestor: Bitcoins,
|
||||
descendant: Bitcoins
|
||||
) extends NetworkResult
|
||||
base: Bitcoins,
|
||||
modified: Bitcoins,
|
||||
ancestor: Bitcoins,
|
||||
descendant: Bitcoins
|
||||
) extends NetworkResult
|
||||
|
||||
case class GetNetTotalsResult(
|
||||
totalbytesrecv: Int,
|
||||
totalbytessent: Int,
|
||||
timemillis: UInt32,
|
||||
uploadtarget: NetTarget
|
||||
) extends NetworkResult
|
||||
totalbytesrecv: Int,
|
||||
totalbytessent: Int,
|
||||
timemillis: UInt32,
|
||||
uploadtarget: NetTarget
|
||||
) extends NetworkResult
|
||||
|
||||
case class NetTarget(
|
||||
timeframe: UInt32,
|
||||
target: Int,
|
||||
target_reached: Boolean,
|
||||
serve_historical_blocks: Boolean,
|
||||
bytes_left_in_cycle: Int,
|
||||
time_left_in_cycle: UInt32
|
||||
) extends NetworkResult
|
||||
timeframe: UInt32,
|
||||
target: Int,
|
||||
target_reached: Boolean,
|
||||
serve_historical_blocks: Boolean,
|
||||
bytes_left_in_cycle: Int,
|
||||
time_left_in_cycle: UInt32
|
||||
) extends NetworkResult
|
||||
|
@ -67,6 +67,7 @@ case class RpcAddress(
|
||||
account: Option[String])
|
||||
extends WalletResult
|
||||
|
||||
case class ImportMultiResult(success: Boolean, error: Option[ImportMultiError]) extends WalletResult
|
||||
case class ImportMultiResult(success: Boolean, error: Option[ImportMultiError])
|
||||
extends WalletResult
|
||||
|
||||
case class ImportMultiError(code: Int, message: String) extends WalletResult
|
||||
case class ImportMultiError(code: Int, message: String) extends WalletResult
|
||||
|
@ -206,15 +206,21 @@ object JsonSerializers {
|
||||
implicit val estimateSmartFeeResultReads: Reads[EstimateSmartFeeResult] =
|
||||
Json.reads[EstimateSmartFeeResult]
|
||||
|
||||
implicit val memoryManagerReads: Reads[MemoryManager] = Json.reads[MemoryManager]
|
||||
implicit val getMemoryInfoResultReads: Reads[GetMemoryInfoResult] = Json.reads[GetMemoryInfoResult]
|
||||
implicit val memoryManagerReads: Reads[MemoryManager] =
|
||||
Json.reads[MemoryManager]
|
||||
implicit val getMemoryInfoResultReads: Reads[GetMemoryInfoResult] =
|
||||
Json.reads[GetMemoryInfoResult]
|
||||
|
||||
implicit val transactionFeesReads: Reads[TransactionFees] = Json.reads[TransactionFees]
|
||||
implicit val memPoolTransactionReads: Reads[MemPoolTransaction] = Json.reads[MemPoolTransaction]
|
||||
implicit val getMemPoolAncestorsResultReads: Reads[GetMemPoolResult] = Json.reads[GetMemPoolResult]
|
||||
implicit val transactionFeesReads: Reads[TransactionFees] =
|
||||
Json.reads[TransactionFees]
|
||||
implicit val memPoolTransactionReads: Reads[MemPoolTransaction] =
|
||||
Json.reads[MemPoolTransaction]
|
||||
implicit val getMemPoolAncestorsResultReads: Reads[GetMemPoolResult] =
|
||||
Json.reads[GetMemPoolResult]
|
||||
|
||||
implicit val netTargetReads: Reads[NetTarget] = Json.reads[NetTarget]
|
||||
implicit val getNetTotalsResultReads: Reads[GetNetTotalsResult] = Json.reads[GetNetTotalsResult]
|
||||
implicit val getNetTotalsResultReads: Reads[GetNetTotalsResult] =
|
||||
Json.reads[GetNetTotalsResult]
|
||||
|
||||
// Mining Models
|
||||
implicit val miningInfoReads: Reads[GetMiningInfoResult] =
|
||||
@ -243,6 +249,8 @@ object JsonSerializers {
|
||||
|
||||
implicit val rpcAddressReads: Reads[RpcAddress] = RpcAddressReads
|
||||
|
||||
implicit val importMultiErrorReads: Reads[ImportMultiError] = Json.reads[ImportMultiError]
|
||||
implicit val importMultiResultReads: Reads[ImportMultiResult] = Json.reads[ImportMultiResult]
|
||||
implicit val importMultiErrorReads: Reads[ImportMultiError] =
|
||||
Json.reads[ImportMultiError]
|
||||
implicit val importMultiResultReads: Reads[ImportMultiResult] =
|
||||
Json.reads[ImportMultiResult]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user