Commit graph

2568 commits

Author SHA1 Message Date
Ben Carman
a7c06a11cb
Add chainHash to ChainParams (#1972)
* Add chainHash to ChainParams

* Rename to genesisHash
2020-09-04 12:15:06 -05:00
Chris Stewart
6fd23b46c6
Remove uncessary import (#1968)
* Remove uncessary import

* Attempt to fix compile
2020-09-03 09:00:37 -05:00
Chris Stewart
1b788d05be
Move getBestFilterHeader() use the best chain by chainwork for determining the fitler header (#1964) 2020-09-02 19:41:52 -05:00
Ben Carman
b36ad557dd
Change maxBy and minBys to use maxByOption and minByOption (#1961)
* Change maxBy and minBys to use maxByOption and minByOption

* Fix compile issue
2020-09-02 16:03:57 -05:00
Chris Stewart
893d036ab6
Rename ChainApi.nextHeaderBatchRange -> ChainApi.nextBlockHeaderBatchrnage (#1957) 2020-09-02 13:19:20 -05:00
Ben Carman
a4dc8053a2
Validate key manager matches account db on wallet startup (#1948) 2020-09-02 07:33:40 -05:00
Ben Carman
45c11f25ec
Fix max by for getBlockCount (#1951)
* Fix max by for getBlockCount

* Add helper func to package
2020-09-01 19:38:15 -05:00
Ben Carman
bd94ff15f9
Only mark utxos as reserved on successful coin selection (#1944)
* Only mark utxos as reserved on successful coin selection

* Add recoverWith

* Fix compile for 2.12.12
2020-09-01 06:34:46 -05:00
Ben Carman
4d6d96c9e7
Fix getBestFilterHeader for headers 2016 or more blocks away from tip (#1943) 2020-08-31 17:00:42 -05:00
Chris Stewart
e08fd2c137
Clean up imports (#1942) 2020-08-31 14:24:09 -05:00
Ben Carman
56937f7728
Give gui command line arguments (#1931) 2020-08-31 12:25:56 -05:00
Chris Stewart
5909a57f09
Make sure both filter ehaders and filters are empty before sending fi… (#1936)
* Make sure both filter ehaders and filters are empty before sending first filterheader sync message

* Address nit
2020-08-31 06:32:01 -05:00
Chris Stewart
5785f0c1a8
Fix maxBy() exception in the case of empty Blockchain in ChainHandler… (#1934)
* Fix maxBy() exception in the case of empty Blockchain in ChainHandler.bestFilterHeaderSearch()

* Add another unit test to CompactFilterHeaderDAO for coverage
2020-08-29 15:29:09 -05:00
Chris Stewart
453e02b58b
Implement getBestFilterHeader based on a number of block headers that… (#1926)
* Implement getBestFilterHeader based on a number of block headers that can be passed in as a parameter. These headers can be used to indicate what your current best chain is

* Bring back compiler opts

* Fix compiler error for maxByOption as it isn't in the 2.12 std library

* Implement a context free best filter headers search. The basic strategy is to look at headers in the _future_ of our current best filter header

* Fix bug in sql query were we were doing max chainWork too early on block headers, we needed to filter out headers in our set and _then_ we get the max chain work

* Add more unit tests
2020-08-29 08:13:38 -05:00
Chris Stewart
739288fef5
Cache DoubleSha256Digest.hex (#1932)
* Cache DoubleSha256Digest.hex

* Cache little endian versino too
2020-08-29 07:35:40 -05:00
Ben Carman
f734e002be
Calculate correct TxoState when processing a transaction (#1929)
* Calculate correct TxoState when processing a transaction

* Test balance
2020-08-28 15:31:48 -05:00
Ben Carman
09556a072d
docs: Fix broken links in Docs + minor touchups (#1908) 2020-08-27 14:11:24 -05:00
Ben Carman
4104e0c973
Fix rescans that are larger than the batch size (#1916)
* Fix rescans that are larger than the batch size

* Add test
2020-08-27 14:09:25 -05:00
Ben Carman
e8c28de421
Warn if peer does not support services we need (#1921) 2020-08-27 13:57:58 -05:00
Ben Carman
f471119880
Create DatabaseDriver ADT instead of booleans (#1902) 2020-08-27 12:41:52 -05:00
Chris Stewart
be891596b6
Improve logging in DataMessageHandler (#1922)
* Improve logging in DataMessageHandler

* Make hashes in logs big endian

* One more big endian conversion i forgot
2020-08-27 12:39:45 -05:00
Ben Carman
267cf06fa7
Fix log to output correct function (#1913) 2020-08-27 07:20:58 -05:00
Chris Stewart
9a1dfdfdbd
Remove AppConfig.initialize() in favor of AppConfig.start() (#1907)
* Remove AppConfig.initialize() in favor of AppConfig.start()

* Fix docs
2020-08-26 16:24:38 -05:00
rorp
1c84dc330f
Add an ability to one Postgres database for all sub-projects (#1897)
* Add an ability to one Postgres database for all sub-projects
2020-08-26 12:20:18 -07:00
Ben Carman
0f5929d65e
Clean up calls in Node and Chain (#1896)
* Clean up calls in Node and Chain

* Remove parens on non-modifying call
2020-08-26 13:04:34 -05:00
Ben Carman
79f757311e
Send get filters message if we haven't cached any yet (#1900) 2020-08-26 12:56:19 -05:00
Chris Stewart
e345227561
docs: Remove e2e dlc info from documentation, add some notes about using gui bundled with node (#1905) 2020-08-26 12:31:08 -05:00
Chris Stewart
b9095035ba
docs: dlc branch -> adaptor-dlc branch (#1903) 2020-08-26 10:48:34 -05:00
Ben Carman
c9c18fabc5
Create ADT for NodeType instead of booleans (#1901) 2020-08-26 07:28:35 -05:00
Chris Stewart
a9ad927a9c
Apply string factory to a bunch of easy things (#1891)
* Apply string factory to a bunch of easy things

* Refactor HDPath, ExtKey, and LnTagPrefix to use StringFactory

* Implemen StringFactory on LnHumanReadablePart, ScriptType, ServiceIdentifier

* Implement StringFactory on AesCrypt, NodeUri, AddressTag, PSBT, TxoState

* Fix failing tests, fix website compile

* Apply StringFactory to all ScriptOperations, ChannelState, Script Parsing
2020-08-25 10:48:37 -05:00
Chris Stewart
9daa7e73af
Bump scalatestplus version (#1894) 2020-08-25 10:34:10 -05:00
Nadav Kohen
3805fc6286
docs: Updated setup and dlc docs (#1895)
Removed graalvm from cli instructions
2020-08-25 10:33:05 -05:00
Ben Carman
ef9bd4165d
Add new hash preimage PSBTInput types (#1893) 2020-08-25 10:23:21 -05:00
Scala Steward
88ae895895
Update scalatest to 3.2.2 (#1876) 2020-08-25 07:09:29 -05:00
Ben Carman
485874d215
Simplify Transaction Broadcast (#1872)
* Simplify transaction broadcast

* Assert tx in db, add note on privacy leak
2020-08-25 07:09:09 -05:00
Ben Carman
4cdbeafb58
Move ChainApi to core (#1888)
* Move Chain Db Reps to core

* Move ChainApi to Core
2020-08-25 07:08:42 -05:00
Ben Carman
66ec89bcab
Move WalletApi to Core (#1890) 2020-08-25 07:05:20 -05:00
Ben Carman
f96bb97a9e
Remove 2.11 specfic files (#1892) 2020-08-25 06:41:41 -05:00
Ben Carman
28ff3186e4
Move WalletApi necessities to core (#1886) 2020-08-24 17:26:58 -05:00
Ben Carman
098c0ee2f5
Update user agent to 0.4.0 (#1887) 2020-08-24 17:20:56 -05:00
Scala Steward
4186be51e0
Update scalafmt-core to 2.6.4 (#1686)
* Update scalafmt-core to 2.6.4

* Format everything

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-08-24 14:24:16 -05:00
Ben Carman
acbdbfac41
Move all remaining wallet db representations (#1885) 2020-08-24 13:13:52 -05:00
Chris Stewart
f702410be5
Db conf on pr 1877 (#1879)
* Extend StartStopAsync with BitcoinSAppConfig, create 'CachedAppConfig' test trait, clean up P2PClientTest

* Start cleaning up after ourselves in the chainTest test suite

* Call .stop() for appConfig's spun up in ChainAppConfigTest

* Database configuration defaults

* increase number of Postgres connections

* add more logging

* close connections pools in tests

* update afterAll()

* Fix conflict

Co-authored-by: rorp <rorp@users.noreply.github.com>
2020-08-24 12:55:04 -05:00
Chris Stewart
b43d5d28f8
2020 08 22 chaintest cleanup (#1877)
* Clean up code for BroadcastDAO test

* Extend StartStopAsync with BitcoinSAppConfig, create 'CachedAppConfig' test trait, clean up P2PClientTest

* Make MerkleBuffersTest use CachedAppConfig

* Start cleaning up after ourselves in the chainTest test suite

* Cancel background runnable for generating blocks after test case, add nodeAppConfig.stop() to tests in NodeAppConfigTest

* Stop mainnet nodeAppConfig in test as per ben's code review

* Refactor ChainUnitTest.withChainFixture() to use makeDependentFixture()

* Call .stop() for appConfig's spun up in ChainAppConfigTest

* Less parallelization on destruction of chainAppConfig

* Revert parallelExecution/fork jvm in CommonSettings
2020-08-24 11:20:02 -05:00
Chris Stewart
e4460bb07f
2020 08 21 clean broadcast dao (#1875)
* Clean up code for BroadcastDAO test

* Extend StartStopAsync with BitcoinSAppConfig, create 'CachedAppConfig' test trait, clean up P2PClientTest

* Make MerkleBuffersTest use CachedAppConfig

* Start cleaning up after ourselves in the chainTest test suite

* Cancel background runnable for generating blocks after test case, add nodeAppConfig.stop() to tests in NodeAppConfigTest

* Stop mainnet nodeAppConfig in test as per ben's code review
2020-08-24 11:19:41 -05:00
Ben Carman
350928beca
Correcly use reference.conf file (#1869)
* Correcly use reference.conf file

* Fix for network specific filter header batch size config option

* Add to other conf files
2020-08-24 06:30:16 -05:00
Chris Stewart
50a43d0502
Remove uncessary extension of Async 'FixtureAsyncFlatSpec' in WalletDaoFixture, it's inherited from BitcoinSWalletTest already (#1881) 2020-08-24 06:29:18 -05:00
Scala Steward
1660f560d4
Update postgresql to 42.2.16 (#1873) 2020-08-23 07:53:36 -05:00
Chris Stewart
403d70eb0b
Fix async bug with destruction of fixtures (#1878) 2020-08-23 07:44:53 -05:00
Ben Carman
f1b228a8ce
Move TransactionDb to Core (#1849)
* Move TransactionDb to Core

* Move to api package
2020-08-22 08:04:30 -05:00