Add test for another tx that broke lnd/btcd (#4868)

This commit is contained in:
benthecarman 2022-11-01 09:35:42 -05:00 committed by GitHub
parent 24e7bcfd97
commit 5111bccc5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

File diff suppressed because one or more lines are too long

View file

@ -52,6 +52,14 @@ class BlockTest extends BitcoinSJvmTest {
assert(tx.hex == lines)
}
it must "parse a large transaction 73be398c4bdc43709db7398106609eea2a7841aaf3a4fa2000dc18184faa2a7e" in {
val fileName =
"/73be398c4bdc43709db7398106609eea2a7841aaf3a4fa2000dc18184faa2a7e.txt"
val lines = Source.fromURL(getClass.getResource(fileName)).mkString.trim
val tx = Transaction.fromHex(lines)
assert(tx.hex == lines)
}
it must "have serialization symmetry" in {
forAllParallel(BlockchainElementsGenerator.block) { block =>
assert(Block(block.hex) == block)