Commit Graph

1410 Commits

Author SHA1 Message Date
Torkel Rogstad
a71aecec52 Process outgoing transactions (#555)
* Split wallet functionality into multiple traits

In this commit we refactor LockedWallet into multiple traits
that provide functionality related to a subset of total wallet
functionality. This has the benefit of making it clear which
methods are helper methods that are only intended to be used
in a very specific setting, and which methods are part of the
internal wallet API that other parts of the wallet can use.

* Rework TransactionOutput and TransactionOutPoint to case classes

* Add extension methods for flattening lists of assertions

* Segregate confirmed and unconfirmed balance methods

* Add test for FutureUtil.sequentially

* Add trace logging of balance fetching

* Process outgoing TXOs

Move TX processing into separate trait, add internal API method

Unify DB representation of TXOs

    Prior to this commit we stored TXO information
    across diferent tables, with joins and tuples
    needed a bunch of places to keep track of
    everything we needed. In this commit we unify
    the tables, leaving us with only one table for
    TXOs.
2019-07-09 06:25:24 -05:00
Chris Stewart
b1635bd4ac Fix issue with testkit not being able to be resolved since we could n… (#579)
* Fix issue with testkit not being able to be resolved since we could not find db-commons dep

* Avoid publishing aggregate project
2019-07-09 06:01:52 -05:00
Torkel Rogstad
cdf68c816f Merge pull request #581 from cwaldron97/2019-07-08-rpcport
Change default RPC port from 18332 to 18443
2019-07-09 11:18:01 +02:00
cwaldron97
307714f33a changed default rpcport from 18332 to 18443 2019-07-08 15:46:22 -05:00
cwaldron97
d18bd1ef44 New doc for Windows users (#572)
* new doc for windows Users

* Update docs/windows-users.md

Co-Authored-By: Torkel Rogstad <torkel@rogstad.io>

* Update docs/windows-users.md

Co-Authored-By: Torkel Rogstad <torkel@rogstad.io>

* additional changes to Windows guide. Need to figure out how to structure if I want to add to contributing instead

* Update windows-users.md
2019-07-08 15:01:23 -05:00
Chris Stewart
4bc44269f1 Reorg handling in chain project (#548)
* Implement 'IndexedSeqLike' on Blockchain data structure to give us access to the scala collection methods we know and love

* Implement ability to handle reorgs in Blockchain.connectTip()

* Add another test case for where block B and C are at the same height as each other, with B being the best block hash. When block D comes in, it is built on top of block C so that means our best block hash should switch to C and then to D after D is connected

* Add more unit tests to Blockchain reorg handling

* Address torkel's code review
2019-07-08 08:33:45 -05:00
rorp
540945bb38 Fix CI builds for Eclair RPC (#576) 2019-07-08 05:42:27 -05:00
Kai Brünnler
2f2da68461 remove duplicate duplicate check :) (#575) 2019-07-04 14:54:46 -05:00
Torkel Rogstad
ecae896afc Merge pull request #573 from torkelrogstad/2019-07-04-nodewithwallettest
Add more diagnostics to NodeWithWalletTest to hunt down CI failure
2019-07-04 14:15:08 +02:00
Torkel Rogstad
554820b3b8 Merge pull request #566 from torkelrogstad/2019-07-03-bloop-mdoc
Add main method for running Mdoc
2019-07-04 11:31:54 +02:00
Torkel Rogstad
2eff1411af Add more diagnostics to NodeWithWalletTest to hunt down CI failure 2019-07-04 11:17:46 +02:00
Torkel Rogstad
53ae772cb3 Merge pull request #563 from cwaldron97/2019-07-02-Windows-implementation-for-bitcoind
Add windows compatability to bitcoind RPC client
2019-07-04 10:19:45 +02:00
cwaldron97
8a576f91f6 fixed silly issue with DEFAULT_BITCOIND_LOCATION 2019-07-03 16:10:17 -05:00
cwaldron97
5171ee61ac testing exception message for CI 2019-07-03 15:21:57 -05:00
cwaldron97
dd4e7d5bf0 hopefully fixing RuntimeException 2019-07-03 15:15:20 -05:00
Chris Stewart
e07dc164c3 Remove useless unit test in eclair project (#568) 2019-07-03 14:49:23 -05:00
cwaldron97
136b59917c fixed windows issues 2019-07-03 14:27:16 -05:00
rorp
d74a0560b8 [WIP] New Eclair RPC client (#535)
* [WIP] New Eclair RPC client

* channel, close, connect, getinfo, open, peers

* allchannels, allnodes, allupdates

* audit, channels, findroutetonode, forceclose, updaterelayfee

* Initial version of createinvoice

* ShortChannelId: improved error handling and scaladoc

* addressed the PR comments

* parseinvoice, payinvoice, getsentinfo, getreceivedinfo, sendtonode, sendtoroute

* unit tests

* addressed the PR comments

* ws, usablebalances, channelstats, networkfees, getinvoice, listinvoices

* addressed PR comments

* change eclair URL

* cleanup

* addressed comments

* fidex compiler warnings

* Eclair 0.3.1

* scaladoc

* cleanup
2019-07-03 13:38:56 -05:00
Torkel Rogstad
8fd9e0211c Add main method for running Mdoc
This allows working on the website without
opening sbt at all. bloop run docs -- --watch
compiles all Mdoc sources and outputs it into
the correct directory.
2019-07-03 16:04:17 +02:00
Torkel Rogstad
9151a03782 Merge pull request #564 from torkelrogstad/2019-07-03-scaladoc-fix
Move Xsource flag into commonCompilerOpts
2019-07-03 12:55:43 +02:00
Torkel Rogstad
6d2f2e9444 Move Xsource flag into commonCompilerOpts
For the last few builds publishing snapshots has failed.
This is because Scaladocs haven't been compiling with
the Xsource flag, which we need for 2.11/2.12 compat
reasons.
2019-07-03 11:21:19 +02:00
cwaldron97
3926030e24 need to figure out DOS regex handling 2019-07-02 15:53:18 -05:00
cwaldron97
b9471f460c started changes need to fix that it looks for bitcoind.exe 2019-07-02 13:45:04 -05:00
Chris Stewart
243e6cb65b Add case for empty bloom filter (#561) 2019-07-02 10:39:22 -05:00
Torkel Rogstad
0e8b7859bc Merge pull request #560 from torkelrogstad/2019-07-02-logging
Tune down excessive logging
2019-07-02 13:57:00 +02:00
Chris Stewart
98e6e0ea67 2019 07 01 windows secp256k1 bin (#559)
* Add windows 64 bit binary

* Add more instructions to README about building windows binary

* a windows CI environment

* Add logic to detect windows os, windows binary has a different file name

* Add a signature for the windows 64 bit binary
2019-07-02 05:42:49 -05:00
Torkel Rogstad
6caaf1938a Tune down excessive logging 2019-07-02 11:22:18 +02:00
Torkel Rogstad
d5a7b7aa0f Merge pull request #534 from torkelrogstad/2019-06-17-wallet-transactions
Process incoming transactions
2019-07-02 11:19:57 +02:00
Torkel Rogstad
3fd96cf776 Have sampleSome do a maximum of 10 attempts 2019-07-01 19:02:01 +02:00
Torkel Rogstad
1d09bf7976 Merge pull request #488 from Christewart/2019-06-02-scalameter
Add scalameter test dependency and sbt settings
2019-07-01 14:23:50 +02:00
Chris Stewart
99ef45cce2 Add scalameter test dependency and sbt settings 2019-07-01 06:44:30 -05:00
Torkel Rogstad
157e3def15 Add annotated type to public method 2019-07-01 13:00:05 +02:00
Torkel Rogstad
121cdf326d Merge pull request #556 from torkelrogstad/2019-06-28-logo
Add Bitcoin-S logo to git repo
2019-06-28 10:32:44 +02:00
Torkel Rogstad
6b731b4b4b Add Bitcoin-S logo to git repo 2019-06-28 10:28:51 +02:00
Ramon Boss
e2585248d9 implement Ordered[T] instead of creating custom methods (#553)
* implement Ordered[T] instead of creating new methods for that

* remove new line

* implement Ordered in LnCurrencyUnit

* implement Ordered in MilliSatoshis

* implement Ordered in ScriptNumber
2019-06-27 09:02:34 -05:00
Torkel Rogstad
c2349c44c2 Rebase cleanup 2019-06-27 15:34:41 +02:00
Torkel Rogstad
50d56f78e4 Make NodeWithWalletTest properly falsifiable 2019-06-27 15:29:21 +02:00
Torkel Rogstad
f8e5ac19ba Add TX generator for non-empty output TXs 2019-06-27 15:29:21 +02:00
Torkel Rogstad
6ffd505946 Add sampleSome method to scalacheck.Gen 2019-06-27 15:29:21 +02:00
Torkel Rogstad
0f5669bac3 Rename HDCHain.toAddress 2019-06-27 15:28:08 +02:00
Torkel Rogstad
c884b9c048 Fix bad comparison in ProcessTransactionTest 2019-06-27 15:28:08 +02:00
Torkel Rogstad
86517c0a6d Replace incoming/outgoing TXs with TXOs
Rework the wallet DB model so that instead
of dealing with incoming and outgoing transactions
we deal with incoming and outgoing transaction
outputs.
2019-06-27 15:28:08 +02:00
Torkel Rogstad
454808abea Add TX generators that pay to a given SPK 2019-06-27 15:28:08 +02:00
Torkel Rogstad
06b8375c81 Add ProcessTransactionTest 2019-06-27 15:28:08 +02:00
Torkel Rogstad
5a04260461 Update wallet integration tests 2019-06-27 15:28:08 +02:00
Torkel Rogstad
1eb80d82a1 Get rid of compiler warnings 2019-06-27 15:28:08 +02:00
Torkel Rogstad
e2ffba5d40 Add getUnconfirmedBalance to wallet 2019-06-27 15:28:08 +02:00
Torkel Rogstad
f5591f3c0f Replace addUtxo with processTransaction
In this commit we replace addUtxo with
processTransaction in the wallet API. addUtxo
is kept around, but only as an internal
implementation detail.

The new flow looks like this:
1) The wallet gets notified about a new TX
    through a processTransaction call
2) It then searches through our already
    processed incoming TXs:
        if found, updates the confirmation
            status
        else, inserts it into the DB
3) We then call addUtxo, if the previous
    step resulted in a new TX in our
    DB
2019-06-27 15:28:08 +02:00
Torkel Rogstad
79b7455b38 Move ID in UTXO DB models for more ergonomic functions 2019-06-27 15:28:08 +02:00
Torkel Rogstad
5513344373 Add findTx to IncomingTxDAO 2019-06-27 15:28:08 +02:00