Skip to content

Commit

Permalink
containers: use mapping for Fascia
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Dec 18, 2023
1 parent 20388f2 commit 84e00d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/containers/partials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::collections::BTreeMap;
use std::ops::{BitOr, BitOrAssign};
use std::vec;

use amplify::confinement;
use amplify::confinement::{Confined, U24};
use bp::seals::txout::CloseMethod;
use commit_verify::mpc;
use rgb::{OpId, Operation, OutputSeal, Transition, TransitionBundle, XAnchor};
use rgb::{ContractId, OpId, Operation, OutputSeal, Transition, TransitionBundle, XAnchor};
use strict_encoding::{StrictDeserialize, StrictDumb, StrictSerialize};

use crate::containers::XchainOutpoint;
Expand Down Expand Up @@ -190,14 +191,14 @@ impl IntoIterator for Batch {
)]
pub struct Fascia {
pub anchor: XAnchor<mpc::MerkleBlock>,
pub bundles: Confined<Vec<TransitionBundle>, 1, U24>,
pub bundles: Confined<BTreeMap<ContractId, TransitionBundle>, 1, U24>,
}

impl StrictDumb for Fascia {
fn strict_dumb() -> Self {
Fascia {
anchor: strict_dumb!(),
bundles: confined_vec![strict_dumb!()],
bundles: confined_bmap![strict_dumb!() => strict_dumb!()],
}
}
}
Expand Down

0 comments on commit 84e00d4

Please sign in to comment.