Skip to content

Commit

Permalink
feat: support for multiple bitcoind addresses in PocketIC library (#2707
Browse files Browse the repository at this point in the history
)

This PR adds the function `PocketIcBuilder::with_bitcoind_addrs` to
specify multiple addresses and ports at which `bitcoind` processes are
listening. This function is necessary for PocketIC integration into dfx.
  • Loading branch information
mraszyk authored Nov 20, 2024
1 parent fa100bb commit 48dd3fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/pocket-ic/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added
- The function `PocketIcBuilder::with_bitcoind_addrs` to specify multiple addresses and ports at which `bitcoind` processes are listening.



## 6.0.0 - 2024-11-13
Expand Down
6 changes: 5 additions & 1 deletion packages/pocket-ic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,12 @@ impl PocketIcBuilder {
}

pub fn with_bitcoind_addr(self, bitcoind_addr: SocketAddr) -> Self {
self.with_bitcoind_addrs(vec![bitcoind_addr])
}

pub fn with_bitcoind_addrs(self, bitcoind_addrs: Vec<SocketAddr>) -> Self {
Self {
bitcoind_addr: Some(vec![bitcoind_addr]),
bitcoind_addr: Some(bitcoind_addrs),
..self
}
}
Expand Down

0 comments on commit 48dd3fd

Please sign in to comment.