-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored crawl-state to crawl. Moved properties to Observation when
needed.
- Loading branch information
1 parent
c2f2157
commit 9760e4c
Showing
33 changed files
with
526 additions
and
522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
# don't ever lint node_modules | ||
node_modules | ||
# don't lint build output (make sure it's set to your correct build folder name) | ||
dist | ||
# don't lint nyc coverage output | ||
coverage | ||
examples | ||
lib | ||
node_modules | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Crawl } from './crawl'; | ||
import { ObservationFactory } from './network-observer/observation-factory'; | ||
import { Slots } from './network-observer/peer-event-handler/stellar-message-handlers/scp-envelope/scp-statement/externalize/slots'; | ||
import { NodeAddress } from './node-address'; | ||
import { QuorumSet } from '@stellarbeat/js-stellarbeat-shared'; | ||
import { Ledger } from './crawler'; | ||
import { P } from 'pino'; | ||
import { PeerNodeCollection } from './peer-node-collection'; | ||
|
||
export class CrawlFactory { | ||
constructor(private observationFactory: ObservationFactory) {} | ||
public createCrawl( | ||
network: string, //todo: configuration? | ||
nodesToCrawl: NodeAddress[], | ||
topTierAddresses: NodeAddress[], | ||
topTierQuorumSet: QuorumSet, | ||
latestConfirmedClosedLedger: Ledger, | ||
quorumSets: Map<string, QuorumSet>, | ||
logger: P.Logger | ||
): Crawl { | ||
const observation = this.observationFactory.createObservation( | ||
network, | ||
new Slots(topTierQuorumSet, logger), | ||
topTierAddresses, | ||
new PeerNodeCollection(), | ||
latestConfirmedClosedLedger, | ||
quorumSets | ||
); | ||
return new Crawl(nodesToCrawl, observation); | ||
} | ||
} |
Oops, something went wrong.