Skip to content

Commit

Permalink
Chore zgt change get for post (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielMartinezRodriguez authored Sep 22, 2023
1 parent fd90c0d commit 4e52154
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion client/authorship/src/authorship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@ where

let raw_zero_gas_transactions_option = if let Some(zero_gas_tx_pool) = self.zero_gas_tx_pool {

let mut request = Box::pin(reqwest::get(zero_gas_tx_pool).fuse());
let http_client = reqwest::Client::new();
let mut request = Box::pin(http_client.post(zero_gas_tx_pool).send().fuse());
let mut timeout = Box::pin(futures_timer::Delay::new(std::time::Duration::from_millis(100)).fuse());


Expand Down
4 changes: 2 additions & 2 deletions docs/ZERO-GAS-TRANSACTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The mechanism underlying Zero Gas Transactions is relatively straightforward. As

### External Private Mempool

The validator selects the transactions from an external private mempool. This mempool is a service that exposes a GET HTTP interface and returns a list of transactions with the following format:
The validator selects the transactions from an external private mempool. This mempool is a service that exposes a POST HTTP interface and returns a list of transactions with the following format:

```json
{
Expand All @@ -32,7 +32,7 @@ All transactions retrieved from this mempool will be processed as Zero Gas Trans

### Setting up the External Mempool for Validators

If you are a validator and wish to integrate this functionality, you simply need to configure your node with the `--zero-gas-tx-pool <URL>` parameter. This option determines the HTTP address to which the validating node will make GET requests to obtain the Zero Gas Transactions during its validation cycle.
If you are a validator and wish to integrate this functionality, you simply need to configure your node with the `--zero-gas-tx-pool <URL>` parameter. This option determines the HTTP address to which the validating node will make POST requests to obtain the Zero Gas Transactions during its validation cycle.

## 3. Other considerations

Expand Down

0 comments on commit 4e52154

Please sign in to comment.