Commit Graph

11 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
dbf7e4525a
lntest: ensure we always cancel active streaming notifications 2018-07-06 12:21:54 -07:00
Olaoluwa Osuntokun
800eea931f
build+multi: switch from bolt to bbolt
In this commit, we switch from boltbd/bolt to coreos/bbolt as the
former is no longer being actively maintained.
2018-03-10 19:01:13 -08:00
Andrew Naoum
0f161c5033 channeldb+lnrpc: store the payment pre-image not rhash
Fixes #481.

Prior to this commit, payments stored in the channel DB only kept a
record of the payment hash. This is a problem as the preimage is what
serves as proof of payment and a user should be able to look up this
value in the future (not just immediately after payment).

Instead of storing both the payment hash and the preimage, we store the
preimage only since the hash can be derrived from this using a SHA256.

In the RPC listpayments command, we now give the preimage in addition to
the payment hash.
2018-01-27 18:36:33 -08:00
Matt Drollette
adf0d98194 multi: fix several typos in godoc comments 2017-12-17 18:40:05 -08:00
Olaoluwa Osuntokun
063525c6e0
channeldb: update the OutgoingPayment struct to use lnwire.MilliSatoshi 2017-08-22 00:52:12 -07:00
Olaoluwa Osuntokun
fe3c3642e2
channeldb: use the Batch method when writing payment details
This commit implements an easy optimization by using bolt db’s Batch
method when writing payment details to disk. The AddPaymnent method can
be concurrently called by thousands of grouting due to the way the
payment dispatch pipeline is architected. With this commit, we shave of
a significant amount of running time when users are sending thousands
of payments a second as what would’ve been thousands of writes can now
be coalesced into one or two writes!
2017-04-11 22:02:09 -07:00
Andrey Samokhvalov
fd97a4bd19 lnd: partially fix golint warnings 2017-03-13 16:30:23 -07:00
Andrey Samokhvalov
8fb54782e2 lnd: fix gosimple warnings 2017-03-13 16:30:23 -07:00
Olaoluwa Osuntokun
f7510cf1fc
channeldb: modify new payments module to match project code-style
This commit modifies the new payment module within the database to
match the coding style of the rest of the package and the project as a
hole. Additionally, a few fields have been renamed, and the extra
timestamp added to the OutgoingPayment struct has been removed as
there’s already a CreationTime field within the Invoice struct that’s
embedded within the OutgoingPayment struct.
2016-12-30 16:32:25 -08:00
BitfuryLightning
1c7f87c3f1
channeldb: refactor payments code
Go-fmt files. Refactored code according to the guidelines.
Enhanced payment test: add error checking
and individual context for each API call.
Add Timestamp field to payment struct.
2016-12-27 16:42:56 -08:00
BitfuryLightning
eb4d0e035e channeldb: save outgoing payments
Add structure for outgoing payments. Saving payment in DB
after successful payment send. Add RPC call for listing
all payments.
2016-12-27 16:16:23 -08:00