File tree Expand file tree Collapse file tree
libs/consensus/v2/routines Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -878,7 +878,7 @@ async function gracefulShutdown(signal: string) {
878878 const forceExitTimeout = setTimeout ( ( ) => {
879879 console . log ( "[SHUTDOWN] Timeout exceeded, forcing exit..." )
880880 process . exit ( 0 )
881- } , 10_000 )
881+ } , 5_000 )
882882 // Don't let this timer itself keep the process alive
883883 if ( forceExitTimeout . unref ) forceExitTimeout . unref ( )
884884
Original file line number Diff line number Diff line change 11import { Peer } from "@/libs/peer"
22import log from "@/utilities/logger"
33import Mempool from "@/libs/blockchain/mempool_v2"
4- import { RPCRequest , RPCResponse , Transaction } from "@kynesyslabs/demosdk/types"
4+ import {
5+ RPCRequest ,
6+ RPCResponse ,
7+ Transaction ,
8+ } from "@kynesyslabs/demosdk/types"
9+ import { getSharedState } from "@/utilities/sharedState"
510
611export async function mergeMempools ( mempool : Transaction [ ] , shard : Peer [ ] ) {
12+ // INFO: if shard only contains us, skip network requests
13+ if (
14+ shard . length === 1 &&
15+ shard [ 0 ] . identity === getSharedState . publicKeyHex
16+ ) {
17+ return
18+ }
19+
720 const promises : Promise < RPCResponse > [ ] = [ ]
821 const request : RPCRequest = {
922 method : "mempool" ,
You can’t perform that action at this time.
0 commit comments