Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Add 'parity_newTransactionsStats' and '--new-transactions-stats-period' description #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Configuring-OpenEthereum.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@ Sealing/Mining Options:
--max-round-blocks-to-import=[S]
Maximal number of blocks to import for each import round. (default: 12)

--new-transactions-stats-period=[N]
Specify number of blocks for which new transactions will be returned in a result of `parity_newTransactionsStats` RPC call. Setting this parameter to 0 will return only transactions imported during the current block. (default: 0)

Internal Options:
--can-restart
Executable will auto-restart if exiting with 69
Expand Down
39 changes: 39 additions & 0 deletions JSONRPC-parity-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ title: The `parity` Module
- [parity_nextNonce](#parity_nextnonce)
- [parity_pendingTransactions](#parity_pendingtransactions)
- [parity_pendingTransactionsStats](#parity_pendingtransactionsstats)
- [parity_newTransactionsStats](#parity_newtransactionsstats)
- [parity_registryAddress](#parity_registryaddress)
- [parity_removeTransaction](#parity_removetransaction)
- [parity_rpcSettings](#parity_rpcsettings)
Expand Down Expand Up @@ -2225,6 +2226,44 @@ Response

***

### parity_newTransactionsStats

Returns propagation stats for transactions recently added into the queue.

#### Parameters

None

#### Returns

- `Object` - mapping of transaction hashes to stats.

#### Example

Request
```bash
curl --data '{"method":"parity_newTransactionsStats","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
```

Response
```js
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"0xdff37270050bcfba242116c745885ce2656094b2d3a0f855649b4a0ee9b5d15a": {
"firstSeen": 3032066,
"propagatedTo": {
"0x605e04a43b1156966b3a3b66b980c87b7f18522f7f712035f84576016be909a2798a438b2b17b1a8c58db314d88539a77419ca4be36148c086900fba487c9d39": 1,
"0xbab827781c852ecf52e7c8bf89b806756329f8cbf8d3d011e744a0bc5e3a0b0e1095257af854f3a8415ebe71af11b0c537f8ba797b25972f519e75339d6d1864": 1
}
}
}
}
```

***

### parity_registryAddress

The address for the global registry.
Expand Down