This repository has been archived by the owner on Mar 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor rpc.controller will match whale rpc.controller (#10)
* refactor rpc.controller will match whale rpc.controller added docker router for whale and playground * test stub.client.ts * fixed unit test * refactor playground setup to be state-aware * added code docs * fixed playground test * updated with traefik health check * added logging * individual wait for
- Loading branch information
Showing
17 changed files
with
436 additions
and
266 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
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
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 |
---|---|---|
@@ -1,15 +1,18 @@ | ||
import { Interval } from '@nestjs/schedule' | ||
import { Injectable } from '@nestjs/common' | ||
import { Injectable, Logger } from '@nestjs/common' | ||
import { JsonRpcClient } from '@defichain/jellyfish-api-jsonrpc' | ||
import { Playground } from '@src/module.playground/playground' | ||
import { PlaygroundSetup } from '@src/module.playground/setup/setup' | ||
|
||
@Injectable() | ||
export class PlaygroundBlock { | ||
private readonly logger = new Logger(PlaygroundBlock.name) | ||
|
||
constructor (private readonly client: JsonRpcClient) { | ||
} | ||
|
||
@Interval(3000) | ||
async generate (): Promise<void> { | ||
await this.client.call('generatetoaddress', [1, Playground.address, 1], 'number') | ||
await this.client.call('generatetoaddress', [1, PlaygroundSetup.address, 1], 'number') | ||
this.logger.log('generated new block') | ||
} | ||
} |
Oops, something went wrong.