Commit 8cdca11
authored
Initial payment store implementation (#13)
* Add inital implementation of persisted payment store
* Implement `KVStoreUnpersister`
* Reorganize IO things into `io` submodules
* Reorganize test folder for consistency
* Move test `bitcoind`/`electrsd` out of `OnceCell`
`OnceCell` doesn't call `drop`, which makes the spawned
`bitcoind`/`electrsd` instances linger around after our tests have
finished. To fix this, we move them out of `OnceCell` and let every test
that needs them spawn their own instances. This additional let us drop
the `OnceCell` dev dependency.
Additionally, we improve the test robustness by applying most of the
changes from
lightningdevkit/rust-lightning#2033.
* Introduce `KVStore` trait and `FilesystemStore` impl
Rather than further relying on the upstream
`KVStorePersister`/`KVStoreUnpersister`, we here implement a general
`KVStore` trait that allows access to `Read`s/`TransactionalWrite`s
which may be used to deserialize/serialize data via the
`Readable`/`Writeable` implementations.
Notably `TransactionalWrite` is a `Write` for which the written data
needs to be explictly `commit`ed, asserting that we always persist
either the whole new change or no change at all.
Additionally, we avoid the `Info` umbrella term but opt to introduce `PaymentDetails`
to align naming with upcoming `PeerDetails` and `ChannelDetails`.
* Unpin BDK/esplora-client1 parent 6aa4a86 commit 8cdca11
File tree
14 files changed
+1857
-620
lines changed- src
- io
- tests
- test
14 files changed
+1857
-620
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 36 | | |
45 | 37 | | |
46 | 38 | | |
| |||
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
52 | | - | |
| 44 | + | |
53 | 45 | | |
54 | 46 | | |
55 | 47 | | |
| |||
59 | 51 | | |
60 | 52 | | |
61 | 53 | | |
62 | | - | |
| 54 | + | |
| 55 | + | |
63 | 56 | | |
64 | 57 | | |
65 | 58 | | |
66 | 59 | | |
67 | | - | |
68 | 60 | | |
| 61 | + | |
69 | 62 | | |
70 | 63 | | |
71 | 64 | | |
| |||
0 commit comments