mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-22 14:33:06 +01:00
Add log txids inside of inventories in big endian rather than little endian (#4013)
This commit is contained in:
parent
e802254a20
commit
dbfd58da86
1 changed files with 14 additions and 0 deletions
|
@ -15,6 +15,20 @@ case class Inventory(typeIdentifier: TypeIdentifier, hash: DoubleSha256Digest)
|
|||
extends NetworkElement {
|
||||
|
||||
override def bytes: ByteVector = RawInventorySerializer.write(this)
|
||||
|
||||
override def toString: String = {
|
||||
typeIdentifier match {
|
||||
case TypeIdentifier.MsgTx | TypeIdentifier.MsgWitnessTx =>
|
||||
//want to make a better toString here so it is easier to search txids
|
||||
s"Inventory($typeIdentifier,txIdBE=${hash.flip.hex})"
|
||||
case TypeIdentifier.MsgBlock | TypeIdentifier.MsgCompactBlock |
|
||||
TypeIdentifier.MsgFilteredBlock | TypeIdentifier.MsgFilteredBlock |
|
||||
TypeIdentifier.MsgCompactBlock |
|
||||
TypeIdentifier.MsgFilteredWitnessBlock |
|
||||
TypeIdentifier.MsgWitnessBlock | _: MsgUnassigned =>
|
||||
super.toString
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object Inventory extends Factory[Inventory] {
|
||||
|
|
Loading…
Add table
Reference in a new issue