@@ -18,7 +18,7 @@ use std::collections::{HashMap, HashSet};
1818use std:: mem;
1919use std:: sync:: Arc ;
2020
21- use ctypes:: transaction:: ShardTransaction ;
21+ use ctypes:: transaction:: { Action , AssetWrapCCCOutput , ShardTransaction , Transaction } ;
2222use kvdb:: { DBTransaction , KeyValueDB } ;
2323use parking_lot:: { Mutex , RwLock } ;
2424use primitives:: { Bytes , H256 } ;
@@ -343,11 +343,34 @@ fn parcel_address_entries(
343343}
344344
345345fn transaction_address_entries (
346+ //check
346347 block_hash : H256 ,
347348 parcel_hashes : impl IntoIterator < Item = UnverifiedTransaction > ,
348349) -> impl Iterator < Item = TransactionHashAndAddress > {
349350 parcel_hashes. into_iter ( ) . enumerate ( ) . filter_map ( move |( parcel_index, parcel) | {
350- Option :: < ShardTransaction > :: from ( parcel. action . clone ( ) ) . map ( |tx| {
351+ let shard_tx = match parcel. action . clone ( ) {
352+ Action :: WrapCCC {
353+ shard_id,
354+ lock_script_hash,
355+ parameters,
356+ quantity,
357+ ..
358+ } => {
359+ let unsigned_tx: Transaction = parcel. into ( ) ;
360+ Some ( ShardTransaction :: WrapCCC {
361+ network_id : unsigned_tx. network_id ,
362+ shard_id,
363+ tx_hash : unsigned_tx. hash ( ) ,
364+ output : AssetWrapCCCOutput {
365+ lock_script_hash,
366+ parameters,
367+ quantity,
368+ } ,
369+ } )
370+ }
371+ other_actions => Option :: < ShardTransaction > :: from ( other_actions) ,
372+ } ;
373+ shard_tx. map ( |tx| {
351374 (
352375 tx. tracker ( ) ,
353376 TransactionAddresses :: new ( TransactionAddress {
0 commit comments