fn mock_anchor_creation_using_pallet_call(src_chain_id: u32, resource_id: &[u8; 32]) {
	// upon successful anchor creation, Tree(with id=0) will be created in
	// `pallet_mt`, make sure Tree(with id=0) doesn't exist in `pallet_mt` storage
	assert_eq!(false, <pallet_mt::Trees<Test>>::contains_key(0));
	assert_ok!(Anchor::create(Origin::root(), TEST_MAX_EDGES, TEST_TREE_DEPTH, 0));
	// hack: insert an entry in AnchorsList with tree-id=0
	AnchorList::<Test>::insert(resource_id, 0);
	Counts::<Test>::insert(src_chain_id, 0);
	// make sure Tree(with id=0) exists in `pallet_mt` storage
	assert_eq!(true, <pallet_mt::Trees<Test>>::contains_key(0));
	// check that anchor has stored `TEST_MAX_EDGES` correctly
	assert_eq!(TEST_MAX_EDGES, <pallet_anchor::MaxEdges<Test>>::get(0));
}
// helper function to create anchor using Anchor pallet call
helper function to create anchor using Anchor pallet call
helper function to create anchor using Anchor pallet call
fn mock_anchor_creation_using_pallet_call(src_chain_id: u32, resource_id: &[u8; 32]) {
	// upon successful anchor creation, Tree(with id=0) will be created in
	// `pallet_mt`, make sure Tree(with id=0) doesn't exist in `pallet_mt` storage
	assert_eq!(false, <pallet_mt::Trees<Test>>::contains_key(0));
	assert_ok!(Anchor::create(Origin::root(), TEST_MAX_EDGES, TEST_TREE_DEPTH, 0));
	// hack: insert an entry in AnchorsList with tree-id=0
	AnchorList::<Test>::insert(resource_id, 0);
	Counts::<Test>::insert(src_chain_id, 0);
	// make sure Tree(with id=0) exists in `pallet_mt` storage
	assert_eq!(true, <pallet_mt::Trees<Test>>::contains_key(0));
	// check that anchor has stored `TEST_MAX_EDGES` correctly
	assert_eq!(TEST_MAX_EDGES, <pallet_anchor::MaxEdges<Test>>::get(0));
}
fn mock_anchor_creation_using_pallet_call ( src_chain_id : u32 , resource_id : & [ u8 ; 32 ] ) { // upon successful anchor creation, Tree(with id=0) will be created in // `pallet_mt`, make sure Tree(with id=0) doesn't exist in `pallet_mt` storage assert_eq ! ( false pallet_mt Trees Test contains_key ( 0 ) ) ; assert_ok ! ( Anchor create ( Origin root ( ) TEST_MAX_EDGES TEST_TREE_DEPTH 0 ) ) ; // hack: insert an entry in AnchorsList with tree-id=0 AnchorList :: < Test > :: insert ( resource_id , 0 ) ; Counts :: < Test > :: insert ( src_chain_id , 0 ) ; // make sure Tree(with id=0) exists in `pallet_mt` storage assert_eq ! ( true pallet_mt Trees Test contains_key ( 0 ) ) ; // check that anchor has stored `TEST_MAX_EDGES` correctly assert_eq ! ( TEST_MAX_EDGES pallet_anchor MaxEdges Test get ( 0 ) ) ; }
helper function to create anchor using Anchor pallet call
helper function to create anchor using Anchor pallet call
src_chain_id
u32
resource_id
&[u8; 32]