mirror of
https://github.com/lightninglabs/aperture.git
synced 2026-01-29 06:04:36 +01:00
Merge pull request #103 from Roasbeef/amp-sqlite-bug-fixes
challenger+config: fix bugs related to config parsing and AMP invoice handling
This commit is contained in:
@@ -102,6 +102,12 @@ func (l *LndChallenger) Start() error {
|
||||
// updates for new invoices and/or newly settled invoices.
|
||||
l.invoicesMtx.Lock()
|
||||
for _, invoice := range invoiceResp.Invoices {
|
||||
// Some invoices like AMP invoices may not have a payment hash
|
||||
// populated.
|
||||
if invoice.RHash == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if invoice.AddIndex > addIndex {
|
||||
addIndex = invoice.AddIndex
|
||||
}
|
||||
@@ -207,6 +213,12 @@ func (l *LndChallenger) readInvoiceStream(
|
||||
default:
|
||||
}
|
||||
|
||||
// Some invoices like AMP invoices may not have a payment hash
|
||||
// populated.
|
||||
if invoice.RHash == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
hash, err := lntypes.MakeHash(invoice.RHash)
|
||||
if err != nil {
|
||||
log.Errorf("Error parsing invoice hash: %v", err)
|
||||
|
||||
@@ -161,7 +161,7 @@ type Config struct {
|
||||
ServeStatic bool `long:"servestatic" description:"Flag to enable or disable static content serving."`
|
||||
|
||||
// DatabaseBackend is the database backend to be used by the server.
|
||||
DatabaseBackend string `long:"dbbackend" description:"The database backend to use for storing all asset related data." choice:"sqlite" choice:"postgres"`
|
||||
DatabaseBackend string `long:"dbbackend" description:"The database backend to use for storing all asset related data." choice:"sqlite" choice:"postgres" yaml:"dbbackend"`
|
||||
|
||||
// Sqlite is the configuration section for the SQLite database backend.
|
||||
Sqlite *aperturedb.SqliteConfig `group:"sqlite" namespace:"sqlite"`
|
||||
|
||||
Reference in New Issue
Block a user