Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Dec 13, 2024
1 parent aaba427 commit a810b9f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { createSecp256k1PeerId } from '@libp2p/peer-id-factory';

import { BootstrapNode } from '../../bootstrap/bootstrap.js';
import { type BootnodeConfig, type P2PConfig, getP2PDefaultConfig } from '../../config.js';
import { DiscV5Service } from './discV5_service.js';
import { PeerDiscoveryState } from '../service.js';
import { DiscV5Service } from './discV5_service.js';

const waitForPeers = (node: DiscV5Service, expectedCount: number): Promise<void> => {
const timeout = 7_000;
Expand Down
4 changes: 1 addition & 3 deletions yarn-project/p2p/src/services/libp2p/libp2p_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import {
import { type PubSubLibp2p, convertToMultiaddr } from '../../util.js';
import { AztecDatastore } from '../data_store.js';
import { SnappyTransform, fastMsgIdFn, getMsgIdFn, msgIdToStrFn } from '../encoding.js';
import { PeerManager } from '../peer_manager.js';
import { PeerErrorSeverity } from '../peer-scoring/peer_scoring.js';
import { PeerManager } from '../peer_manager.js';
import { pingHandler, statusHandler } from '../reqresp/handlers.js';
import {
DEFAULT_SUB_PROTOCOL_HANDLERS,
Expand Down Expand Up @@ -504,8 +504,6 @@ export class LibP2PService<T extends P2PClientType> extends WithTracer implement
[Attributes.TX_HASH]: requestedTxHash.toString(),
}))
private async validateRequestedTx(requestedTxHash: TxHash, responseTx: Tx, peerId: PeerId): Promise<boolean> {


const proofValidator = new TxProofValidator(this.proofVerifier);
const validProof = await proofValidator.validateTx(responseTx);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { jest } from '@jest/globals';
import { type PeerId } from '@libp2p/interface';
import { type MockProxy, mock } from 'jest-mock-extended';

import { type PeerManager } from '../../peer_manager.js';
import { PeerErrorSeverity } from '../../peer-scoring/peer_scoring.js';
import { type PeerManager } from '../../peer_manager.js';
import { PING_PROTOCOL, type ReqRespSubProtocolRateLimits, TX_REQ_PROTOCOL } from '../interface.js';
import { RequestResponseRateLimiter } from './rate_limiter.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/
import { type PeerId } from '@libp2p/interface';

import { type PeerManager } from '../../peer_manager.js';
import { PeerErrorSeverity } from '../../peer-scoring/peer_scoring.js';
import { type PeerManager } from '../../peer_manager.js';
import { type ReqRespSubProtocol, type ReqRespSubProtocolRateLimits } from '../interface.js';
import { DEFAULT_RATE_LIMITS } from './rate_limits.js';

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/p2p/src/services/reqresp/reqresp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
startNodes,
stopNodes,
} from '../../mocks/index.js';
import { type PeerManager } from '../peer_manager.js';
import { PeerErrorSeverity } from '../peer-scoring/peer_scoring.js';
import { type PeerManager } from '../peer_manager.js';
import { PING_PROTOCOL, RequestableBuffer, TX_REQ_PROTOCOL } from './interface.js';

const PING_REQUEST = RequestableBuffer.fromBuffer(Buffer.from('ping'));
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/p2p/src/services/reqresp/reqresp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { compressSync, uncompressSync } from 'snappy';
import { type Uint8ArrayList } from 'uint8arraylist';

import { CollectiveReqRespTimeoutError, IndiviualReqRespTimeoutError } from '../../errors/reqresp.error.js';
import { type PeerManager } from '../peer_manager.js';
import { PeerErrorSeverity } from '../peer-scoring/peer_scoring.js';
import { type PeerManager } from '../peer_manager.js';
import { type P2PReqRespConfig } from './config.js';
import {
DEFAULT_SUB_PROTOCOL_HANDLERS,
Expand Down

0 comments on commit a810b9f

Please sign in to comment.