apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-resolved.yaml
kompose.version: 1.22.0 (955b78124)
creationTimestamp: null
labels:
io.kompose.service: lb
name: lb
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: lb
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-resolved.yaml
kompose.version: 1.22.0 (955b78124)
creationTimestamp: null
labels:
io.kompose.service: lb
spec:
containers:
- env:
- name: LIGHTNINGD_NETWORK
value: regtest
image: elementsproject/lightningd:latest
name: lb
resources: {}
volumeMounts:
- mountPath: /root/.lightning
name: lb-claim0
restartPolicy: Always
volumes:
- name: lb-claim0
persistentVolumeClaim:
claimName: lb-claim0
status: {}
ild
blob: bec6ebc602e9ab6547e947e556666aff056c885b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
BitcoinCore = require("bitcoin-core");
fs = require("fs");
config = require("./config");
bc = new BitcoinCore(config.bitcoin);
l = require("pino")();
require("./db");
console.log(db.Payment);
(async () => {
payments = (
await db.Payment.findAll({
attributes: ["hash"],
})
).map((p) => p.hash);
const transactions = await bc.listTransactions("*", 1000);
var stream = fs.createWriteStream("exceptions", {
flags: "a",
emitClose: true,
});
transactions.map((tx) => {
if (!payments.includes(tx.txid)) {
l.info("writing", tx.txid);
stream.write(tx.txid + "\n");
}
});
stream.end();
stream.on("close", () => {
l.info("done");
process.exit();
});
})();
|