diff --git a/src/lib/watchers/bma/head-watcher.ts b/src/lib/watchers/bma/head-watcher.ts index 47c1787..75a9c04 100644 --- a/src/lib/watchers/bma/head-watcher.ts +++ b/src/lib/watchers/bma/head-watcher.ts @@ -4,7 +4,7 @@ import {WS2PHead} from "duniter/app/modules/ws2p/lib/WS2PCluster"; function handleLateness(confHead: ConfHead, mainHeads: HeadMetric[], observedHead?: TrameWS2P) { if (!mainHeads.length) { - throw 'No consensus found' + throw 'Observed pubkey ${confHead.observedPubkey}: no consensus found' } if (!observedHead) { throw `Observed pubkey ${confHead.observedPubkey} not found in heads` @@ -14,7 +14,7 @@ function handleLateness(confHead: ConfHead, mainHeads: HeadMetric[], observedHea // Check how much late is the node const farAwayHeads = mainHeads.filter(h => h.blockNumber - observedHead.blockNumber >= confHead.maxLateBlocks) if (farAwayHeads.length) { - throw `Observed pubkey is too late for ${farAwayHeads.length} consensus by at least ${confHead.maxLateBlocks}` + throw `Observed pubkey ${confHead.observedPubkey} is too late for ${farAwayHeads.length} consensus by at least ${confHead.maxLateBlocks}` } } }