mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 09:52:09 +01:00
Add test for parsing super large transaction (#4849)
This commit is contained in:
parent
f483e356cb
commit
8431b697a8
File diff suppressed because one or more lines are too long
@ -1,5 +1,6 @@
|
||||
package org.bitcoins.core.protocol.blockchain
|
||||
|
||||
import org.bitcoins.core.protocol.transaction.Transaction
|
||||
import org.bitcoins.testkitcore.gen.BlockchainElementsGenerator
|
||||
import org.bitcoins.testkitcore.util.BitcoinSJvmTest
|
||||
|
||||
@ -43,6 +44,14 @@ class BlockTest extends BitcoinSJvmTest {
|
||||
assert(time <= 15000)
|
||||
}
|
||||
|
||||
it must "parse a large transaction 7393096d97bfee8660f4100ffd61874d62f9a65de9fb6acf740c4c386990ef73" in {
|
||||
val fileName =
|
||||
"/7393096d97bfee8660f4100ffd61874d62f9a65de9fb6acf740c4c386990ef73.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)
|
||||
|
Loading…
Reference in New Issue
Block a user