Skip to content

Commit

Permalink
Merge pull request #6 from Chia-Network/fix-ssl-sert
Browse files Browse the repository at this point in the history
Add port option
  • Loading branch information
Rigidity authored Apr 6, 2023
2 parents 9acea48 + 864fd66 commit f036cd4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/clients/FullNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,17 @@ export interface GetMempoolItemByTxId {
mempool_item: MempoolItem;
}

export interface FullNodeOptions extends ClientOptions {
port: number;
}

export class FullNode extends Client {
constructor(options: ClientOptions | string) {
constructor(options: FullNodeOptions | string) {
super(options);
this.port ??= this.config!.full_node.rpc_port;
this.port =
typeof options === 'string'
? this.config!.full_node.rpc_port
: options.port;
}

/**
Expand Down

0 comments on commit f036cd4

Please sign in to comment.