Skip to content

Commit 84e00d4

Browse files
committed
containers: use mapping for Fascia
1 parent 20388f2 commit 84e00d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/containers/partials.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@
1919
// See the License for the specific language governing permissions and
2020
// limitations under the License.
2121

22+
use std::collections::BTreeMap;
2223
use std::ops::{BitOr, BitOrAssign};
2324
use std::vec;
2425

2526
use amplify::confinement;
2627
use amplify::confinement::{Confined, U24};
2728
use bp::seals::txout::CloseMethod;
2829
use commit_verify::mpc;
29-
use rgb::{OpId, Operation, OutputSeal, Transition, TransitionBundle, XAnchor};
30+
use rgb::{ContractId, OpId, Operation, OutputSeal, Transition, TransitionBundle, XAnchor};
3031
use strict_encoding::{StrictDeserialize, StrictDumb, StrictSerialize};
3132

3233
use crate::containers::XchainOutpoint;
@@ -190,14 +191,14 @@ impl IntoIterator for Batch {
190191
)]
191192
pub struct Fascia {
192193
pub anchor: XAnchor<mpc::MerkleBlock>,
193-
pub bundles: Confined<Vec<TransitionBundle>, 1, U24>,
194+
pub bundles: Confined<BTreeMap<ContractId, TransitionBundle>, 1, U24>,
194195
}
195196

196197
impl StrictDumb for Fascia {
197198
fn strict_dumb() -> Self {
198199
Fascia {
199200
anchor: strict_dumb!(),
200-
bundles: confined_vec![strict_dumb!()],
201+
bundles: confined_bmap![strict_dumb!() => strict_dumb!()],
201202
}
202203
}
203204
}

0 commit comments

Comments
 (0)