RGB-WG / rgb-core

RGB Core Library: consensus validation for private & scalable client-validated smart contracts on Bitcoin & Lightning
https://spec.rgb.tech
Apache License 2.0
207 stars 52 forks source link

Validate network #189

Closed dr-orlovsky closed 11 months ago

dr-orlovsky commented 11 months ago

This adds additional validation on whether testnet/mainnet used by the RGB wallet match the contract network.

Before we were putting responsibility to validate this on the wallet, but I think it is better to do it right in RGB core as a part of the overall validation

codecov[bot] commented 11 months ago

Codecov Report

Merging #189 (aa20287) into master (3932816) will decrease coverage by 0.1%. The diff coverage is 0.0%.

:exclamation: Current head aa20287 differs from pull request most recent head f256d1d. Consider uploading reports for the commit f256d1d to get more accurate results

@@           Coverage Diff            @@
##           master    #189     +/-   ##
========================================
- Coverage    16.0%   16.0%   -0.1%     
========================================
  Files          31      31             
  Lines        3398    3409     +11     
========================================
  Hits          544     544             
- Misses       2854    2865     +11     
Flag Coverage Δ
rust 16.0% <0.0%> (-0.1%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/contract/operations.rs 24.6% <ø> (ø)
src/stl.rs 100.0% <ø> (ø)
src/validation/status.rs 0.0% <ø> (ø)
src/validation/validator.rs 0.0% <0.0%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more