Commit graph

4574 commits

Author SHA1 Message Date
Tom McCabe
ebdb29f832 fix transaction generator, clean up spacing in Constants 2016-07-11 11:07:15 -05:00
Tom McCabe
1e3bcc1435 fix serialization symmetry for Specs of Block, BlockHeader and CompactSizeUInt 2016-07-08 12:58:41 -05:00
Tom McCabe
6914a2e102 refactor underlying.toInt in TransactionTestUtil 2016-07-06 15:55:26 -05:00
Tom McCabe
3c6ccf510d remove incorrect import causing travis CI build to break 2016-07-06 15:50:36 -05:00
Tom McCabe
350a41b5be change logback level to warn, implement | for UInt32 and add spec, replace underlying.toInt with override toInt function 2016-07-06 15:41:31 -05:00
Tom McCabe
32b2da3f28 add respective generators and specs for ScriptNumber, Block, BlockHeader, CompactSizeUInt 2016-07-06 15:04:50 -05:00
Tom McCabe
6d4763acf4 implement toInt function for all signed/unsigned numbers, add Int64 boolean operators to ScriptNumber 2016-07-05 15:00:27 -05:00
Tom McCabe
de999ab03b Merge branch 'refactor_number_system' of https://github.com/Christewart/bitcoin-s-core into refactor_number_system 2016-07-05 13:05:23 -05:00
Tom McCabe
0947484e03 refactor num to underlying 2016-07-05 13:02:18 -05:00
Chris Stewart
48316f4505 Merge branch 'master' into refactor_number_system 2016-07-05 12:57:44 -05:00
Tom McCabe
fa80a1096e add Int64 in LockTimeInterpreter 2016-07-01 21:27:04 -05:00
Tom McCabe
cc5c00d613 Merge branch 'refactor_number_system' of https://github.com/Christewart/bitcoin-s-core into refactor_number_system 2016-07-01 11:57:06 -05:00
Tom McCabe
739e1b11b6 replacing appropriate native scala numbers with UInt32s 2016-07-01 11:56:40 -05:00
Chris Stewart
fe352c8a59 Fixing bug in creating CompactSizeUInt from num, also extending Factory from CompactSizeUInt factory object 2016-06-30 09:20:42 -05:00
Chris Stewart
9b57cdef0b Adding CompactSizeUIntSpec, adding function to create CompactSizeUInt from a number 2016-06-29 15:38:39 -05:00
Tom McCabe
efc3d41437 refactor numbers in BlockHeader and Block 2016-06-28 15:08:26 -05:00
Tom McCabe
e6fff6a7c8 Merge branch 'refactor_number_system' of https://github.com/Christewart/bitcoin-s-core into refactor_number_system 2016-06-28 08:42:57 -05:00
Chris Stewart
a0991e1751 Fixing bug in serialization of UInt64s 2016-06-28 08:41:13 -05:00
Tom McCabe
a3883cd580 Merge branch 'refactor_number_system' of https://github.com/Christewart/bitcoin-s-core into refactor_number_system 2016-06-27 13:30:42 -05:00
Chris Stewart
d30f53f901 Refactoring generators into src/, this allows us to reuse them in other projects 2016-06-27 11:53:08 -05:00
Chris Stewart
deeea0c304 Fixing bug with serialization of UInt64s, wasn't being padded correctly perviously 2016-06-27 10:50:50 -05:00
Tom McCabe
0dd210f769 Merge branch 'master' of https://github.com/bitcoin-s/bitcoin-s-core into refactor_number_system 2016-06-27 08:32:40 -05:00
Chris Stewart
96e68723dd Merge pull request #16 from TomMcCabe/base58_json_tests
Base58 json tests
2016-06-25 09:02:07 -05:00
Chris Stewart
45bbacd857 Serializatoin symmetry now passing in TransactionSpec, fixing bugs in Transaction serializer 2016-06-24 18:56:06 -05:00
Chris Stewart
8a4f8c1a57 Refactoring RawTransactionInputParser to be more coherent, fixing bugs reading/writing tx inputs and in calculating compact size uints 2016-06-24 18:37:20 -05:00
Tom McCabe
63667d106f adding some tests for Base58 and ECPrivateKey 2016-06-24 17:53:25 -05:00
Chris Stewart
72a85f1370 Adding TransactionSpec, fixing a few bugs to do with casting/creating transactions 2016-06-24 16:25:58 -05:00
Tom McCabe
fce3f62106 move findVersionByte and make private, add some parameter descriptions 2016-06-24 16:14:23 -05:00
Chris Stewart
16a416ff38 Adding TransactionInputSpec and TransactionInput generators 2016-06-24 15:26:11 -05:00
Tom McCabe
88b0e87755 add scala docs, breakdown isValid Base58 function 2016-06-24 14:07:15 -05:00
Chris Stewart
70d3417db2 Adding TransactionOutputSpec with serialization symmetry, adding generators for EmptyScriptPubKeys & EmptyScriptSignatures inside of ScriptGenerators 2016-06-24 14:04:25 -05:00
Chris Stewart
b4b93bf49b Creating P2SHScriptPubKeySpec & P2SHScriptSignatureSpec, adding companion object to create P2SHScriptSigs & P2SHScriptPubKeys, adding functionality to calculate push operators for constants in scripts 2016-06-24 13:07:52 -05:00
Tom McCabe
97bb9f0438 Merge branch 'refactor_number_system' of https://github.com/Christewart/bitcoin-s-core into refactor_number_system 2016-06-24 11:34:53 -05:00
Tom McCabe
16100cc393 add test case for priv keys that correspond to compressed pub keys, all tests pass 2016-06-23 18:08:05 -05:00
Chris Stewart
44d01ef65e Merge pull request #5 from Christewart/refactor_currency_units
Refactor currency units
2016-06-23 15:50:51 -05:00
Chris Stewart
8bdbf9fd5b Cleaning up the code base, removing a few methods from CurrencyUnits 2016-06-23 15:47:38 -05:00
Chris Stewart
015e7966e8 Refactoring CurrencyUnits to just use Satoshis, Satoshis now has underlying number type of Int64 which is what is used in Bitcoin Core 2016-06-23 15:33:34 -05:00
Chris Stewart
de56ae3632 Changing the functionality of math operations inside of Numbers - now you get the direct type back. For instance if you add two Int32s you will receive a Int32 back instead of a SignedNumber. You can no longer perform math operations between Int32s & Int64s and UInt64s & UInt32s 2016-06-23 12:27:24 -05:00
Chris Stewart
fecfe43d54 Adding MultiSignatureScriptPubKeySpec and serialization symmetry specificiation 2016-06-23 08:26:35 -05:00
Tom McCabe
697ddea97f remove commented code and optimize imports 2016-06-22 14:26:32 -05:00
Chris Stewart
024029e999 Adding companion objects for both P2PKScriptPubKey & P2PKHScriptPubKey, and their corresponding Specs 2016-06-22 14:24:18 -05:00
Chris Stewart
f2e73126f0 Adding MultiSignatureScriptSignature companion object, MultiSignatureScriptSignatureSpec & test for serialization symmetry 2016-06-22 13:43:51 -05:00
Tom McCabe
a09df87462 Merge branch 'master' into base58_json_tests 2016-06-22 10:11:39 -05:00
Tom McCabe
0c31a7fb87 read base58 valid/invalid tests, add function to base58 to determine validity 2016-06-22 10:07:28 -05:00
Chris Stewart
092d1abacf Fixing bug in isMultiSignature function, adding companion objects for P2PKHScriptSig & P2PKScriptSig, adding generators and specs for P2PKScriptSig 2016-06-22 10:07:27 -05:00
Chris Stewart
ff18fd7aac Adding TransactionOutPointSpec, testing serialization symmetry 2016-06-21 20:38:40 -05:00
Chris Stewart
13b76eb0d6 Refactoring mathematical operations inside of UInt32 and UInt64 2016-06-21 12:58:12 -05:00
Chris Stewart
ebe84a5f9b Finished implementing Int64Spec 2016-06-21 11:33:19 -05:00
Chris Stewart
c39f7ccd73 Finished spec for Int32 2016-06-21 10:37:24 -05:00
Chris Stewart
cbbf70b837 Refactoring encodeHex for numbers to encode numbers to ALWAYS have the maximum bytes in the number type. For instance a long will ALWAYS have 16 characters when encoded to hex 2016-06-21 09:53:03 -05:00