mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-12-06 17:27:57 +00:00
Fix event handler stacking leak
This commit is contained in:
26
index.mjs
26
index.mjs
@@ -35,21 +35,21 @@ connections
|
|||||||
// processed in order (sorted on sequence) and emitted in order
|
// processed in order (sorted on sequence) and emitted in order
|
||||||
// to clients to prevent async tx sequence problems.
|
// to clients to prevent async tx sequence problems.
|
||||||
] })
|
] })
|
||||||
|
|
||||||
c.on("validation", validation => onValidation({
|
|
||||||
connectionUrl: c.getState()?.server?.uri,
|
|
||||||
networkId: c.getState()?.server?.networkId,
|
|
||||||
validation,
|
|
||||||
}))
|
|
||||||
|
|
||||||
c.on("ledger", ledger => onLedger({
|
|
||||||
connectionUrl: c.getState()?.server?.uri,
|
|
||||||
networkId: c.getState()?.server?.networkId,
|
|
||||||
ledger,
|
|
||||||
connection: c,
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.on("validation", validation => onValidation({
|
||||||
|
connectionUrl: c.getState()?.server?.uri,
|
||||||
|
networkId: c.getState()?.server?.networkId,
|
||||||
|
validation,
|
||||||
|
}))
|
||||||
|
|
||||||
|
c.on("ledger", ledger => onLedger({
|
||||||
|
connectionUrl: c.getState()?.server?.uri,
|
||||||
|
networkId: c.getState()?.server?.networkId,
|
||||||
|
ledger,
|
||||||
|
connection: c,
|
||||||
|
}))
|
||||||
|
|
||||||
c.on('online', () => subscribe())
|
c.on('online', () => subscribe())
|
||||||
|
|
||||||
c.on('error', e => console.error(e?.message || e))
|
c.on('error', e => console.error(e?.message || e))
|
||||||
|
|||||||
Reference in New Issue
Block a user