func (handler *TransactionStore) GetTransactionsByID(trxIDs [][]byte) ([]*transaction_store.TransactionItem, error) {
	trxs := make([]*transaction_store.TransactionItem, 0)

	handler.rwmutex.RLock()
	defer handler.rwmutex.RUnlock()

	for _, tid := range trxIDs {
		if tid == nil {
			return nil, errors.New("transaction id was nil")
		}
		itemBytes, err := handler.backend.Get(tid)
		if err != nil {
			return nil, fmt.Errorf("%w, %v", ErrBackend, err)
		}
		if len(itemBytes) != 0 {
			item := &transaction_store.TransactionItem{}
			if err := proto.Unmarshal(itemBytes, item); err != nil {
				return nil, fmt.Errorf("%w, %v", ErrDeserialization, err)
			}

			trxs = append(trxs, item)
		}
	}

	return trxs, nil
}
// GetTransactionsByID returns transactions by transaction ID
GetTransactionsByID returns transactions by transaction ID
// GetTransactionsByID returns transactions by transaction ID
func (handler *TransactionStore) GetTransactionsByID(trxIDs [][]byte) ([]*transaction_store.TransactionItem, error) {
	trxs := make([]*transaction_store.TransactionItem, 0)
	handler.rwmutex.RLock()
	defer handler.rwmutex.RUnlock()
	for _, tid := range trxIDs {
		if tid == nil {
			return nil, errors.New("transaction id was nil")
		}
		itemBytes, err := handler.backend.Get(tid)
		if err != nil {
			return nil, fmt.Errorf("%w, %v", ErrBackend, err)
		}
		if len(itemBytes) != 0 {
			item := &transaction_store.TransactionItem{}
			if err := proto.Unmarshal(itemBytes, item); err != nil {
				return nil, fmt.Errorf("%w, %v", ErrDeserialization, err)
			}
			trxs = append(trxs, item)
		}
	}
	return trxs, nil
}
func ( handler * TransactionStore ) GetTransactionsByID ( trxIDs [ ] [ ] byte ) ( [ ] * transaction_store . TransactionItem , error ) { trxs := make ( [ ] * transaction_store . TransactionItem , 0 ) handler . rwmutex . RLock ( ) defer handler . rwmutex . RUnlock ( ) for _ , tid := range trxIDs { if tid == nil { return nil , errors . New ( " " ) } itemBytes , err := handler . backend . Get ( tid ) if err != nil { return nil , fmt . Errorf ( " " , ErrBackend , err ) } if len ( itemBytes ) != 0 { item := & transaction_store . TransactionItem { } if err := proto . Unmarshal ( itemBytes , item ) ; err != nil { return nil , fmt . Errorf ( " " , ErrDeserialization , err ) } trxs = append ( trxs , item ) } } return trxs , nil }
GetTransactionsByID returns transactions by transaction ID
GetTransactionsByID returns transactions by transaction ID