Skip to content

Commit

Permalink
chore: update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Oct 12, 2024
1 parent 07c55b3 commit 3111cd0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
33 changes: 12 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,17 @@ serde = ["serde_crate", "serde_yaml", "bp-std/serde", "descriptors/serde", "rgb-
features = ["all"]

[patch.crates-io]
bp-wallet = { git = "https://github.com/BP-WG/bp-wallet", branch = "develop" }
bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "develop" }
bp-dbc = { git = "https://github.com/BP-WG/bp-core", branch = "develop" }
bp-seals = { git = "https://github.com/BP-WG/bp-core", branch = "develop" }
bp-core = { git = "https://github.com/BP-WG/bp-core", branch = "develop" }
bp-invoice = { git = "https://github.com/BP-WG/bp-std", branch = "develop" }
bp-derive = { git = "https://github.com/BP-WG/bp-std", branch = "develop" }
descriptors = { git = "https://github.com/BP-WG/bp-std", branch = "develop" }
psbt = { git = "https://github.com/BP-WG/bp-std", branch = "develop" }
bp-std = { git = "https://github.com/BP-WG/bp-std", branch = "develop" }
bp-esplora = { git = "https://github.com/BP-WG/bp-esplora-client", branch = "master" }
rgb-core = { git = "https://github.com/RGB-WG/rgb-core", branch = "fix/273" }
rgb-std = { git = "https://github.com/RGB-WG/rgb-std", branch = "fix/rgb-252" }
bp-wallet = { git = "https://github.com/BP-WG/bp-wallet", branch = "develop" }
rgb-core = { git = "https://github.com/RGB-WG/rgb-core", branch = "develop" }
rgb-invoice = { git = "https://github.com/RGB-WG/rgb-std", branch = "develop" }
rgb-std = { git = "https://github.com/RGB-WG/rgb-std", branch = "develop" }
5 changes: 4 additions & 1 deletion src/indexers/electrum_blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// limitations under the License.

use std::iter;
use std::num::NonZeroU32;

use bp::ConsensusDecode;
use bpstd::{Network, Tx, Txid};
Expand Down Expand Up @@ -124,8 +125,10 @@ impl RgbResolver for Client {
let tx_height = u32::try_from(get_merkle_res.block_height)
.map_err(|_| s!("impossible height value"))?;

let height =
check!(NonZeroU32::new(tx_height).ok_or(Error::InvalidResponse(tx_details.clone())));

Check warning on line 129 in src/indexers/electrum_blocking.rs

View check run for this annotation

Codecov / codecov/patch

src/indexers/electrum_blocking.rs#L128-L129

Added lines #L128 - L129 were not covered by tests
let pos = check!(
WitnessPos::new(tx_height, block_time)
WitnessPos::bitcoin(height, block_time)

Check warning on line 131 in src/indexers/electrum_blocking.rs

View check run for this annotation

Codecov / codecov/patch

src/indexers/electrum_blocking.rs#L131

Added line #L131 was not covered by tests
.ok_or(Error::InvalidResponse(tx_details.clone()))
);

Expand Down
7 changes: 6 additions & 1 deletion src/indexers/esplora_blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::num::NonZeroU32;

use bp::Tx;
use bpstd::{Network, Txid};
use esplora::BlockingClient;
Expand Down Expand Up @@ -48,7 +50,10 @@ impl RgbResolver for BlockingClient {
.and_then(|h| status.block_time.map(|t| (h, t)))
{
Some((h, t)) => {
WitnessOrd::Mined(WitnessPos::new(h, t as i64).ok_or(Error::InvalidServerData)?)
let height = NonZeroU32::new(h).ok_or(Error::InvalidServerData)?;

Check warning on line 53 in src/indexers/esplora_blocking.rs

View check run for this annotation

Codecov / codecov/patch

src/indexers/esplora_blocking.rs#L53

Added line #L53 was not covered by tests
WitnessOrd::Mined(
WitnessPos::bitcoin(height, t as i64).ok_or(Error::InvalidServerData)?,

Check warning on line 55 in src/indexers/esplora_blocking.rs

View check run for this annotation

Codecov / codecov/patch

src/indexers/esplora_blocking.rs#L55

Added line #L55 was not covered by tests
)
}
None => WitnessOrd::Tentative,
};
Expand Down

0 comments on commit 3111cd0

Please sign in to comment.