Files
bitcoin/src
MarcoFalke f6c44e999b Merge #21602: rpc: add additional ban time fields to listbanned
d3b0b08b0f doc: release notes for new listbanned fields (Jarol Rodriguez)
60290d3f5e test: increase listbanned unit test coverage (Jon Atack)
3e978d1a5d rpc: add time_remaining field to listbanned (Jarol Rodriguez)
5456b34531 rpc: add ban_duration field to listbanned (Jarol Rodriguez)
c95c61657a doc: improve listbanned help (Jarol Rodriguez)
dd3c8eaa33 rpc: swap position of banned_until and ban_created fields (Jarol Rodriguez)

Pull request description:

  This PR adds a `ban_duration` and `time_remaining` field to the `listbanned` RPC command. Thanks to jonatack, this PR also expands the `listbanned` test coverage to include these new fields

  It's useful to keep track of `ban_duration` as this is another data point on which to sort banned peers. I found this helpful in adding additional context columns to the GUI `bantablemodel` as part of a follow-up PR. As [suggested](https://github.com/bitcoin/bitcoin/pull/21602#issuecomment-813486134) by jonatack, `time_remaining` is another useful user-centric data point.

  Since a ban always expires after its created, the `ban_created` field is now placed before the `banned_until` field. This new ordering is more logical.

  This PR also improves the `help listbanned` output by providing additional context to the descriptions of the `address`, `ban_created`, and `banned_until` fields.

  **Master: listbanned**
  ```
  [
    {
      "address": "1.2.3.4/32",
      "banned_until": 1617691101,
      "ban_created": 1617604701
    },
    {
      "address": "135.181.41.129/32",
      "banned_until": 1649140716,
      "ban_created": 1617604716
    }
  ]
  ```

  **PR: listbanned**
  ```
  [
    {
      "address": "1.2.3.4/32",
      "ban_created": 1617775773,
      "banned_until": 1617862173,
      "ban_duration": 86400,
      "time_remaining": 86392
    },
    {
      "address": "3.114.211.172/32",
      "ban_created": 1617753165,
      "banned_until": 1618357965,
      "ban_duration": 604800,
      "time_remaining": 582184
    }
  ]
  ```

ACKs for top commit:
  jonatack:
    re-ACK d3b0b08b0f
  hebasto:
    ACK d3b0b08b0f, tested on Linux Mint 20.1 (x86_64).
  MarcoFalke:
    review ACK d3b0b08b0f 🕙

Tree-SHA512: 5b83ed2483344e546d57e43adc8a1ed7a1fff292124b14c86ca3a1aa2aec8b0f7198212fabff2c5145e7f726ca04ae567fe667b141254c7519df290cf63774e5
2021-04-11 13:36:29 +02:00
..
2020-12-08 19:26:30 +01:00
2021-04-06 14:50:17 +08:00
2020-11-19 15:48:24 +01:00
2021-04-06 14:50:17 +08:00
2021-03-11 13:45:14 +08:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2021-03-17 17:59:22 -07:00
2021-03-17 17:59:22 -07:00
2020-12-31 09:45:41 +01:00
2021-01-04 12:31:31 +08:00
2021-01-04 12:23:16 +08:00
2020-12-31 09:45:41 +01:00
2021-01-04 12:23:16 +08:00
2021-01-07 18:07:09 +02:00
2021-01-04 12:31:31 +08:00
2021-04-01 11:35:27 +01:00
2021-04-06 14:50:17 +08:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2020-04-30 09:19:14 -04:00
2021-01-13 02:05:00 +01:00
2021-03-11 13:45:14 +08:00
2020-07-01 14:44:24 -04:00
2021-03-18 18:43:52 +01:00
2020-10-12 12:14:53 -07:00
2020-04-16 13:33:09 -04:00
2021-04-06 14:50:17 +08:00