mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-19 13:35:17 +01:00
Add better Block.toString that doesn't blow up logs (#2585)
* Add better Block.toString that doesn't blow up logs * Use .toLong as ben suggested
This commit is contained in:
parent
0424bd8309
commit
04cc10effe
1 changed files with 7 additions and 2 deletions
|
@ -51,11 +51,16 @@ sealed abstract class Block extends NetworkElement {
|
||||||
*/
|
*/
|
||||||
object Block extends Factory[Block] {
|
object Block extends Factory[Block] {
|
||||||
|
|
||||||
sealed private case class BlockImpl(
|
private case class BlockImpl(
|
||||||
blockHeader: BlockHeader,
|
blockHeader: BlockHeader,
|
||||||
txCount: CompactSizeUInt,
|
txCount: CompactSizeUInt,
|
||||||
transactions: Seq[Transaction])
|
transactions: Seq[Transaction])
|
||||||
extends Block
|
extends Block {
|
||||||
|
|
||||||
|
override def toString: String = {
|
||||||
|
s"Block(blockHeader=${blockHeader}, txCount=${txCount.toLong})"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def apply(
|
def apply(
|
||||||
blockHeader: BlockHeader,
|
blockHeader: BlockHeader,
|
||||||
|
|
Loading…
Add table
Reference in a new issue