Commit Graph

4 Commits

Author SHA1 Message Date
cloudhead d973fd42f2
cli: Auto-connect on sync
This adds functionality so that on `rad sync` and `rad clone`, we
connect to known seeds if necessary, before attempting to fetch.

In passing, some related changes were made:

* The `rad sync` command's arguments were reworked:
  `--replicas <count>` can be used to specify a replica count when
    fetching
* The `rad patch` command no longer has a `--fetch` option
* It's now possible to tell the node not to automatically connect to
  peers in the background
* `AddressBook` is being used underneath `Seeds` to allow for shuffled
  iteration
2023-08-11 11:45:27 +02:00
Alexis Sellier 8202495e24
cli: Rework `rad sync` command
By default, `rad sync` will both fetch and announce now.

To only fetch or only announce, the `--fetch` or `--announce` flags
can be used.
2023-05-15 15:34:45 +02:00
Alexis Sellier dd7d86abb0
cli: Update examples to use new `fail` decorator 2023-05-12 12:54:21 +02:00
Alexis Sellier 671c169244
node: Implement `rad sync` command
This command announces refs to peers and waits for them to be
in sync.

Adds a subscribe method to `Handle` so that we can get the events
from the seed to allow us to confirm that the configured seeds fetched
from us.
2023-04-24 11:39:37 +02:00