mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 09:52:09 +01:00
Timelock bug fix (#920)
* Fix CLTV bug where timestamps using seconds are not allowed in TxBuilder * Added test for CLTV second timestamp and ran scalafmt * Fixed another bug * Fixed bug where calcLockTime was not looking past first CLTV tx
This commit is contained in:
parent
5206353a4a
commit
b2e5337827
@ -10,7 +10,6 @@ class NetworkMessageTest extends BitcoinSUnitTest {
|
||||
NodeTestUtil.rawNetworkMessage)
|
||||
}
|
||||
|
||||
|
||||
it must "serialize and deserialize a version message example from the bitcoin wiki" in {
|
||||
val hex = {
|
||||
//taken from here with slight modifications
|
||||
@ -24,6 +23,6 @@ class NetworkMessageTest extends BitcoinSUnitTest {
|
||||
"00"
|
||||
}.toLowerCase
|
||||
val networkMsg = NetworkMessage.fromHex(hex)
|
||||
networkMsg.hex must be (hex)
|
||||
networkMsg.hex must be(hex)
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,16 @@
|
||||
package org.bitcoins.core.script.interpreter
|
||||
|
||||
import org.bitcoins.core.crypto.{BaseTxSigComponent, WitnessTxSigComponentP2SH, WitnessTxSigComponentRaw}
|
||||
import org.bitcoins.core.crypto.{
|
||||
BaseTxSigComponent,
|
||||
WitnessTxSigComponentP2SH,
|
||||
WitnessTxSigComponentRaw
|
||||
}
|
||||
import org.bitcoins.core.currency.CurrencyUnits
|
||||
import org.bitcoins.core.protocol.script._
|
||||
import org.bitcoins.core.protocol.transaction.{TransactionOutput, WitnessTransaction}
|
||||
import org.bitcoins.core.protocol.transaction.{
|
||||
TransactionOutput,
|
||||
WitnessTransaction
|
||||
}
|
||||
import org.bitcoins.core.script.PreExecutionScriptProgram
|
||||
import org.bitcoins.core.script.flag.ScriptFlagFactory
|
||||
import org.bitcoins.core.script.interpreter.testprotocol.CoreTestCase
|
||||
@ -27,7 +34,7 @@ class ScriptInterpreterTest extends BitcoinSUnitTest {
|
||||
val source = Source.fromURL(getClass.getResource("/script_tests.json"))
|
||||
|
||||
//use this to represent a single test case from script_valid.json
|
||||
/* val lines =
|
||||
/* val lines =
|
||||
"""
|
||||
| [["0x01 0x80", "DUP BOOLOR", "P2SH,STRICTENC", "EVAL_FALSE", "negative-0 negative-0 BOOLOR"]]
|
||||
""".stripMargin*/
|
||||
|
Loading…
Reference in New Issue
Block a user