コード例 #1
0
ファイル: sample.py プロジェクト: zjcsp/fabric-sdk-py
        'payload').get('header').get(
        'channel_header').get('tx_id')

    # Query block by txid
    response = loop.run_until_complete(cli.query_block_by_txid(
        requestor=org1_admin,
        channel_name='businesschannel',
        peers=['peer0.org1.example.com', 'peer1.org1.example.com'],
        tx_id=tx_id
    ))
    print(response)

    # Query by block number
    response = loop.run_until_complete(cli.query_block(
        requestor=org1_admin,
        channel_name='businesschannel',
        peers=['peer0.org1.example.com', 'peer1.org1.example.com'],
        block_number='0'
    ))
    print(response)

    # Query instantiated chaincodes
    responses = loop.run_until_complete(cli.query_instantiated_chaincodes(
        requestor=org1_admin,
        channel_name='businesschannel',
        peers=['peer0.org1.example.com', 'peer1.org1.example.com']
    ))
    print(responses)

    # Get Channel configuration
    responses = loop.run_until_complete(cli.get_channel_config(
        requestor=org1_admin,
コード例 #2
0
        'header').get('channel_header').get('tx_id')

    # Query block by txid
    response = loop.run_until_complete(
        cli.query_block_by_txid(
            requestor=org1_admin,
            channel_name='businesschannel',
            peers=['peer0.org1.example.com', 'peer1.org1.example.com'],
            tx_id=tx_id))
    print(response)

    # Query by block number
    response = loop.run_until_complete(
        cli.query_block(
            requestor=org1_admin,
            channel_name='businesschannel',
            peers=['peer0.org1.example.com', 'peer1.org1.example.com'],
            block_number='0'))
    print(response)

    # Query instantiated chaincodes
    responses = loop.run_until_complete(
        cli.query_instantiated_chaincodes(
            requestor=org1_admin,
            channel_name='businesschannel',
            peers=['peer0.org1.example.com', 'peer1.org1.example.com']))
    print(responses)

    # Get Channel configuration
    responses = loop.run_until_complete(
        cli.get_channel_config(