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.
This commit is contained in:
1 parent
fc18db0130
commit
0f161c5033
6 files changed
+150
-134
No files matched your search
@@ -1676,6 +1676,10 @@
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "/ The fee paid for this payment in satoshis"
|
||||
},
|
||||
"payment_preimage": {
|
||||
"type": "string",
|
||||
"title": "/ The payment preimage"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user