Skip to content

Commit

Permalink
/kind feature
Browse files Browse the repository at this point in the history
Add getDifficulty
  • Loading branch information
izzycsy committed May 24, 2021
1 parent 19011f6 commit b2c497b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
14 changes: 0 additions & 14 deletions packages/jellyfish-api-core/__tests__/category/blockchain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,21 +249,7 @@ describe('masternode', () => {
})
})

// getDifficulty of masternode & non masternode
describe('getdifficulty', () => {
// const container = new DifficultyRegTest()
const client = new ContainerAdapterClient(container)

beforeAll(async () => {
await container.start()
await container.waitForReady()
// await container.waitForWalletCoinbaseMaturity()
})

afterAll(async () => {
await container.stop()
})

it('should getDifficulty', async () => {
const difficulty = await client.blockchain.getDifficulty()
expect(difficulty).toBeGreaterThanOrEqual(0)
Expand Down
2 changes: 1 addition & 1 deletion packages/jellyfish-api-core/src/category/blockchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class Blockchain {
}

/**
* Get difficulty of chain.
* Get the proof-of-work difficulty as a multiple of the minimum difficulty.
*
* @return {Promise<number>}
*/
Expand Down
1 change: 1 addition & 0 deletions website/docs/jellyfish/api/blockchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ Return the proof-of-work difficulty as a multiple of the minimum difficulty.
interface blockchain {
getDifficulty (): Promise<number>
}
```

## getTxOut

Expand Down

0 comments on commit b2c497b

Please sign in to comment.