Commit Graph

2279 Commits

Author SHA1 Message Date
Chris Stewart
265716c99d docs: dlc branch -> adaptor-dlc branch (#1903) 2020-08-26 10:48:34 -05:00
Ben Carman
34ef07ef5a Create ADT for NodeType instead of booleans (#1901) 2020-08-26 07:28:35 -05:00
Chris Stewart
955978f635 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
2252dc528e Bump scalatestplus version (#1894) 2020-08-25 10:34:10 -05:00
Nadav Kohen
f975e747ef docs: Updated setup and dlc docs (#1895)
Removed graalvm from cli instructions
2020-08-25 10:33:05 -05:00
Ben Carman
a678230123 Add new hash preimage PSBTInput types (#1893) 2020-08-25 10:23:21 -05:00
Scala Steward
50ea2d5135 Update scalatest to 3.2.2 (#1876) 2020-08-25 07:09:29 -05:00
Ben Carman
10425760c3 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
f468fff7ea 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
304896e171 Move WalletApi to Core (#1890) 2020-08-25 07:05:20 -05:00
Ben Carman
98164bc5e3 Move WalletApi necessities to core (#1886) 2020-08-24 17:26:58 -05:00
Ben Carman
3b7858ecfb Update user agent to 0.4.0 (#1887) 2020-08-24 17:20:56 -05:00
Scala Steward
bef9c2648e 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
cfde581d0c Move all remaining wallet db representations (#1885) 2020-08-24 13:13:52 -05:00
Chris Stewart
172744f47c 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
3e8e9b0e85 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
32f03bdf0b 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
2f512364eb 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
3ae3090d50 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
873501db71 Update postgresql to 42.2.16 (#1873) 2020-08-23 07:53:36 -05:00
Chris Stewart
05026e5697 Fix async bug with destruction of fixtures (#1878) 2020-08-23 07:44:53 -05:00
Ben Carman
c6ad90139a Move TransactionDb to Core (#1849)
* Move TransactionDb to Core

* Move to api package
2020-08-22 08:04:30 -05:00
Ben Carman
9e06b826e1 Move AddressTagDb to Core (#1850)
* Move AddressTagDb to Core

* Move to wallet api package
2020-08-21 16:31:30 -05:00
Chris Stewart
adf6da5c5d Start calling appConfig.stop() in destruction fixture code (#1868)
* Start calling appConfig.stop() in destruction fixture code

* Address ben's code review
2020-08-21 14:54:23 -05:00
Ben Carman
d187834e1a Create KeyManager Api & move SpendingInfoDb to core (#1848)
* Create KeyManager Api & move SpendingInfoDb to core

* Fix docs, remove sealed form KeyManagerApi

* Move SpendingInfoDb to core wallet api
2020-08-21 14:37:12 -05:00
Ben Carman
683c11b2ab Fix selecting Utxos twice in fundRawTransactionInternal (#1866)
* Fix selecting Utxos twice in fundRawTransactionInternal

* Simplify watch an arbitrary SPK test
2020-08-21 10:11:02 -05:00
Nadav Kohen
e8b195f477 Implement basic TLV functionality (#1847)
* Defined BigSizeUInt as in BOLT 1

* Introduced UInt16 and TLV types

* Responded to review

* Responded to review
2020-08-20 14:42:16 -05:00
rorp
2f8dcd1e57 Watch arbitrary SPKs (#1860)
* Watch arbitrary SPKs

* fix unit tests

* fix unit tests

* one more fix

* revert the compiler parameters
2020-08-20 14:33:18 -05:00
Ben Carman
113f97946c Fix V8 Migration (#1862) 2020-08-19 17:04:04 -05:00
Chris Stewart
22b7a19366 Bring back strict compiler opts (#1854) 2020-08-19 09:17:39 -05:00
Ben Carman
f187a8c7d5 Fix safely broadcast a transaction twice twice test (#1851) 2020-08-19 06:20:45 -05:00
Ben Carman
a3f1399e95 Remove unnecessary parallelization in Wallet (#1823)
* Remove unnecessary parallelization in Wallet

* Fix things being called multiple times

* Move to independent function

* Move helper methods to be separate

* Move back to intermediate val
2020-08-18 15:30:52 -05:00
Ben Carman
29e380856b Rolling log file location (#1846)
* Rolling log file location

* Fix file name
2020-08-18 14:37:22 -05:00
rorp
b5a40035ce Refactor wallet DB (#1798)
* Refactor wallet DB

* fix create(), update() and upsert()

* remove accout foreign key

* fix wallet fixtures

* update Postgres schema

* update SQLite schema

* fix AddressHandlingTest

* fix SQLITE_BUSY exception in TransactionProcessing

* fix RescanHandlingTest

* revert NeutrinoNodeTest

* fix SpendingInfoDAOTest

* fix SQLITE_BUSY exceptions

* fix DbManagementTest

* fix "Task rejected" Slick exceptions in Postgres mode

* responded to the PR comments
2020-08-18 13:43:12 -05:00
Ben Carman
cfd6f4fa79 Fix server parsing for send to address (#1819) 2020-08-17 09:49:50 -05:00
Ben Carman
4d46094d72 Add missing route for getaddressinfo (#1834) 2020-08-17 06:27:16 -05:00
Ben Carman
9e8e57505c Fix case of cli command sendwithalgo (#1835) 2020-08-16 16:16:27 -05:00
Ben Carman
f7b9c5722f Use database to calculate number of confirmations (#1789)
* Use database to calculate number of confirmations

* Check block is in best chain

* Use db

* Optimize getNumberOfConfirmations

* Fix compile issue for older versions

* Add better logging messages

* More logs

* Update confs sequentially
2020-08-16 16:15:13 -05:00
Ben Carman
a34599b7e8 Fix get missing utxos (#1832) 2020-08-16 16:14:13 -05:00
Scala Steward
b103042789 Update sbt-native-packager to 1.7.5 (#1838) 2020-08-16 09:01:16 -05:00
Scala Steward
c7f310df11 Update postgresql to 42.2.15 (#1831) 2020-08-16 08:50:26 -05:00
Ben Carman
6131f29f15 Don't wait for rescan completion to send message (#1836) 2020-08-16 08:46:36 -05:00
Ben Carman
ffa1f04d7f Disable logging for tests (#1839) 2020-08-16 08:16:30 -05:00
Chris Stewart
380adb5cdb Batch and execute headers for chain work calculation test case, this … (#1837) 2020-08-15 14:05:01 -05:00
Ben Carman
562f789504 Create primary key of (address, tag_type) for AddressTag table (#1828) 2020-08-15 12:52:00 -05:00
Chris Stewart
c9f78a2a40 2020 08 14 issue 1829 (#1833)
* Fix O(n^2) behavior in BaseBlockchain.connectWalkBackwards, cache BlockHeader.hash after the first time it is called

* Revert a few files
2020-08-15 07:31:50 -05:00
Chris Stewart
48e3cb8e14 Attempt to batch checking of headers in chainTest to avoid reject exe… (#1826)
* Attempt to batch checking of headers in chainTest to avoid reject execution exceptions in the scala slick database queue

* Fix 2.12 compile issue
2020-08-15 07:23:26 -05:00
Chris Stewart
2445003503 Fix address tag issue where we weren't adding tags to an address, we were replacing existing tags (#1824) 2020-08-14 10:06:28 -05:00
Ben Carman
48a7f6f86e Remove default false for useLogbackConf (#1816)
* Remove default false for useLogbackConf

* Fix docs

* Set logging level to WARN for tests
2020-08-14 08:53:07 -05:00
Ben Carman
403ed33dbd Require utxos aren't spent when sending from outpoints (#1817) 2020-08-14 08:43:18 -05:00