Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: get txpool API #1364

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ devtools:
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
go install github.com/NathanBaulch/[email protected]
go install github.com/pactus-project/protoc-gen-doc/cmd/protoc-gen-doc@master
go install github.com/bufbuild/buf/cmd/buf@v1.32
go install github.com/pactus-project/protoc-gen-doc/cmd/protoc-gen-doc@v0.0.0-20240619124021-76fc28241eb6
go install github.com/bufbuild/buf/cmd/buf@v1.34
go install mvdan.cc/gofumpt@latest
go install github.com/rakyll/[email protected]
go install github.com/pacviewer/jrpc-gateway/[email protected]
Expand Down
1 change: 1 addition & 0 deletions state/facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ type Facade interface {
CalculateFee(amt amount.Amount, payloadType payload.Type) amount.Amount
PublicKey(addr crypto.Address) (crypto.PublicKey, error)
AvailabilityScore(valNum int32) float64
AllPendingTxs() []*tx.Tx
}
4 changes: 4 additions & 0 deletions state/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,7 @@ func (m *MockState) PublicKey(addr crypto.Address) (crypto.PublicKey, error) {
func (*MockState) AvailabilityScore(_ int32) float64 {
return 0.987
}

func (*MockState) AllPendingTxs() []*tx.Tx {
return make([]*tx.Tx, 0)
}
7 changes: 7 additions & 0 deletions state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,3 +795,10 @@ func (st *state) AvailabilityScore(valNum int32) float64 {

return st.scoreMgr.AvailabilityScore(valNum)
}

func (st *state) AllPendingTxs() []*tx.Tx {
st.lk.RLock()
defer st.lk.RUnlock()

return st.txPool.AllPendingTxs()
}
1 change: 1 addition & 0 deletions txpool/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type Reader interface {
HasTx(id tx.ID) bool
Size() int
EstimatedFee(amt amount.Amount, payloadType payload.Type) amount.Amount
AllPendingTxs() []*tx.Tx
kehiy marked this conversation as resolved.
Show resolved Hide resolved
}

type TxPool interface {
Expand Down
4 changes: 4 additions & 0 deletions txpool/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ func (m *MockTxPool) PrepareBlockTransactions() block.Txs {
func (*MockTxPool) EstimatedFee(_ amount.Amount, _ payload.Type) amount.Amount {
return amount.Amount(0.1e9)
}

func (m *MockTxPool) AllPendingTxs() []*tx.Tx {
return make([]*tx.Tx, m.Size())
}
19 changes: 19 additions & 0 deletions txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,25 @@ func (p *txPool) EstimatedFee(_ amount.Amount, payloadType payload.Type) amount.
return payloadPool.estimatedFee()
}

func (p *txPool) AllPendingTxs() []*tx.Tx {
p.lk.RLock()
defer p.lk.RUnlock()

txs := make([]*tx.Tx, 0, p.Size())

var next *linkedlist.Element[linkedmap.Pair[tx.ID, *tx.Tx]]
for _, pool := range p.pools {
for e := pool.list.HeadNode(); e != nil; e = next {
next = e.Next
trx := e.Data.Value

txs = append(txs, trx)
}
}

return txs
}

func (p *txPool) String() string {
return fmt.Sprintf("{💸 %v 🔐 %v 🔓 %v 🎯 %v 🧾 %v}",
p.pools[payload.TypeTransfer].list.Size(),
Expand Down
13 changes: 13 additions & 0 deletions www/grpc/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,19 @@ func (s *blockchainServer) GetPublicKey(_ context.Context,
return &pactus.GetPublicKeyResponse{PublicKey: publicKey.String()}, nil
}

func (s *blockchainServer) GetTxPoolContent(_ context.Context,
_ *pactus.GetTxPoolContentRequest,
) (*pactus.GetTxPoolContentResponse, error) {
result := make([]*pactus.TransactionInfo, 0)
for _, t := range s.state.AllPendingTxs() {
result = append(result, transactionToProto(t))
}

return &pactus.GetTxPoolContentResponse{
Txs: result,
}, nil
}

func (s *blockchainServer) validatorToProto(val *validator.Validator) *pactus.ValidatorInfo {
data, _ := val.Bytes()

Expand Down
3 changes: 3 additions & 0 deletions www/grpc/buf/grpc-gateway.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ http:
- selector: pactus.Blockchain.GetPublicKey
get: "/pactus/blockchain/get_public_key"

- selector: pactus.Transaction.GetTxPoolContent
get: "/pactus/blockchain/get_txpool_content"

# Transaction APIs
- selector: pactus.Transaction.GetTransaction
get: "/pactus/transaction/get_transaction"
Expand Down
93 changes: 93 additions & 0 deletions www/grpc/gen/dart/blockchain.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:protobuf/protobuf.dart' as $pb;
import 'transaction.pb.dart' as $0;

import 'blockchain.pbenum.dart';
import 'transaction.pbenum.dart' as $0;

export 'blockchain.pbenum.dart';

Expand Down Expand Up @@ -1022,6 +1023,94 @@ class GetConsensusInfoResponse extends $pb.GeneratedMessage {
$core.List<ConsensusInfo> get instances => $_getList(0);
}

class GetTxPoolContentRequest extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTxPoolContentRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..e<$0.PayloadType>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType', $pb.PbFieldType.OE, defaultOrMaker: $0.PayloadType.UNKNOWN, valueOf: $0.PayloadType.valueOf, enumValues: $0.PayloadType.values)
..hasRequiredFields = false
;

GetTxPoolContentRequest._() : super();
factory GetTxPoolContentRequest({
$0.PayloadType? payloadType,
}) {
final _result = create();
if (payloadType != null) {
_result.payloadType = payloadType;
}
return _result;
}
factory GetTxPoolContentRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory GetTxPoolContentRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
GetTxPoolContentRequest clone() => GetTxPoolContentRequest()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
GetTxPoolContentRequest copyWith(void Function(GetTxPoolContentRequest) updates) => super.copyWith((message) => updates(message as GetTxPoolContentRequest)) as GetTxPoolContentRequest; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static GetTxPoolContentRequest create() => GetTxPoolContentRequest._();
GetTxPoolContentRequest createEmptyInstance() => create();
static $pb.PbList<GetTxPoolContentRequest> createRepeated() => $pb.PbList<GetTxPoolContentRequest>();
@$core.pragma('dart2js:noInline')
static GetTxPoolContentRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetTxPoolContentRequest>(create);
static GetTxPoolContentRequest? _defaultInstance;

@$pb.TagNumber(1)
$0.PayloadType get payloadType => $_getN(0);
@$pb.TagNumber(1)
set payloadType($0.PayloadType v) { setField(1, v); }
@$pb.TagNumber(1)
$core.bool hasPayloadType() => $_has(0);
@$pb.TagNumber(1)
void clearPayloadType() => clearField(1);
}

class GetTxPoolContentResponse extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTxPoolContentResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..pc<$0.TransactionInfo>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'txs', $pb.PbFieldType.PM, subBuilder: $0.TransactionInfo.create)
..hasRequiredFields = false
;

GetTxPoolContentResponse._() : super();
factory GetTxPoolContentResponse({
$core.Iterable<$0.TransactionInfo>? txs,
}) {
final _result = create();
if (txs != null) {
_result.txs.addAll(txs);
}
return _result;
}
factory GetTxPoolContentResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory GetTxPoolContentResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
GetTxPoolContentResponse clone() => GetTxPoolContentResponse()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
GetTxPoolContentResponse copyWith(void Function(GetTxPoolContentResponse) updates) => super.copyWith((message) => updates(message as GetTxPoolContentResponse)) as GetTxPoolContentResponse; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static GetTxPoolContentResponse create() => GetTxPoolContentResponse._();
GetTxPoolContentResponse createEmptyInstance() => create();
static $pb.PbList<GetTxPoolContentResponse> createRepeated() => $pb.PbList<GetTxPoolContentResponse>();
@$core.pragma('dart2js:noInline')
static GetTxPoolContentResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetTxPoolContentResponse>(create);
static GetTxPoolContentResponse? _defaultInstance;

@$pb.TagNumber(1)
$core.List<$0.TransactionInfo> get txs => $_getList(0);
}

class ValidatorInfo extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ValidatorInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..a<$core.List<$core.int>>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash', $pb.PbFieldType.OY)
Expand Down Expand Up @@ -1750,5 +1839,9 @@ class BlockchainApi {
var emptyResponse = GetPublicKeyResponse();
return _client.invoke<GetPublicKeyResponse>(ctx, 'Blockchain', 'GetPublicKey', request, emptyResponse);
}
$async.Future<GetTxPoolContentResponse> getTxPoolContent($pb.ClientContext? ctx, GetTxPoolContentRequest request) {
var emptyResponse = GetTxPoolContentResponse();
return _client.invoke<GetTxPoolContentResponse>(ctx, 'Blockchain', 'GetTxPoolContent', request, emptyResponse);
}
}

25 changes: 24 additions & 1 deletion www/grpc/gen/dart/blockchain.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,26 @@ const GetConsensusInfoResponse$json = const {

/// Descriptor for `GetConsensusInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List getConsensusInfoResponseDescriptor = $convert.base64Decode('ChhHZXRDb25zZW5zdXNJbmZvUmVzcG9uc2USMwoJaW5zdGFuY2VzGAEgAygLMhUucGFjdHVzLkNvbnNlbnN1c0luZm9SCWluc3RhbmNlcw==');
@$core.Deprecated('Use getTxPoolContentRequestDescriptor instead')
const GetTxPoolContentRequest$json = const {
'1': 'GetTxPoolContentRequest',
'2': const [
const {'1': 'payload_type', '3': 1, '4': 1, '5': 14, '6': '.pactus.PayloadType', '10': 'payloadType'},
],
};

/// Descriptor for `GetTxPoolContentRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List getTxPoolContentRequestDescriptor = $convert.base64Decode('ChdHZXRUeFBvb2xDb250ZW50UmVxdWVzdBI2CgxwYXlsb2FkX3R5cGUYASABKA4yEy5wYWN0dXMuUGF5bG9hZFR5cGVSC3BheWxvYWRUeXBl');
@$core.Deprecated('Use getTxPoolContentResponseDescriptor instead')
const GetTxPoolContentResponse$json = const {
'1': 'GetTxPoolContentResponse',
'2': const [
const {'1': 'txs', '3': 1, '4': 3, '5': 11, '6': '.pactus.TransactionInfo', '10': 'txs'},
],
};

/// Descriptor for `GetTxPoolContentResponse`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List getTxPoolContentResponseDescriptor = $convert.base64Decode('ChhHZXRUeFBvb2xDb250ZW50UmVzcG9uc2USKQoDdHhzGAEgAygLMhcucGFjdHVzLlRyYW5zYWN0aW9uSW5mb1IDdHhz');
@$core.Deprecated('Use validatorInfoDescriptor instead')
const ValidatorInfo$json = const {
'1': 'ValidatorInfo',
Expand Down Expand Up @@ -332,6 +352,7 @@ const $core.Map<$core.String, $core.dynamic> BlockchainServiceBase$json = const
const {'1': 'GetValidatorByNumber', '2': '.pactus.GetValidatorByNumberRequest', '3': '.pactus.GetValidatorResponse'},
const {'1': 'GetValidatorAddresses', '2': '.pactus.GetValidatorAddressesRequest', '3': '.pactus.GetValidatorAddressesResponse'},
const {'1': 'GetPublicKey', '2': '.pactus.GetPublicKeyRequest', '3': '.pactus.GetPublicKeyResponse'},
const {'1': 'GetTxPoolContent', '2': '.pactus.GetTxPoolContentRequest', '3': '.pactus.GetTxPoolContentResponse'},
],
};

Expand Down Expand Up @@ -368,7 +389,9 @@ const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> Blockchain
'.pactus.GetValidatorAddressesResponse': GetValidatorAddressesResponse$json,
'.pactus.GetPublicKeyRequest': GetPublicKeyRequest$json,
'.pactus.GetPublicKeyResponse': GetPublicKeyResponse$json,
'.pactus.GetTxPoolContentRequest': GetTxPoolContentRequest$json,
'.pactus.GetTxPoolContentResponse': GetTxPoolContentResponse$json,
};

/// Descriptor for `Blockchain`. Decode as a `google.protobuf.ServiceDescriptorProto`.
final $typed_data.Uint8List blockchainServiceDescriptor = $convert.base64Decode('CgpCbG9ja2NoYWluEj0KCEdldEJsb2NrEhcucGFjdHVzLkdldEJsb2NrUmVxdWVzdBoYLnBhY3R1cy5HZXRCbG9ja1Jlc3BvbnNlEkkKDEdldEJsb2NrSGFzaBIbLnBhY3R1cy5HZXRCbG9ja0hhc2hSZXF1ZXN0GhwucGFjdHVzLkdldEJsb2NrSGFzaFJlc3BvbnNlEk8KDkdldEJsb2NrSGVpZ2h0Eh0ucGFjdHVzLkdldEJsb2NrSGVpZ2h0UmVxdWVzdBoeLnBhY3R1cy5HZXRCbG9ja0hlaWdodFJlc3BvbnNlElgKEUdldEJsb2NrY2hhaW5JbmZvEiAucGFjdHVzLkdldEJsb2NrY2hhaW5JbmZvUmVxdWVzdBohLnBhY3R1cy5HZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlElUKEEdldENvbnNlbnN1c0luZm8SHy5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1JlcXVlc3QaIC5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1Jlc3BvbnNlEkMKCkdldEFjY291bnQSGS5wYWN0dXMuR2V0QWNjb3VudFJlcXVlc3QaGi5wYWN0dXMuR2V0QWNjb3VudFJlc3BvbnNlEkkKDEdldFZhbGlkYXRvchIbLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXF1ZXN0GhwucGFjdHVzLkdldFZhbGlkYXRvclJlc3BvbnNlElkKFEdldFZhbGlkYXRvckJ5TnVtYmVyEiMucGFjdHVzLkdldFZhbGlkYXRvckJ5TnVtYmVyUmVxdWVzdBocLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXNwb25zZRJkChVHZXRWYWxpZGF0b3JBZGRyZXNzZXMSJC5wYWN0dXMuR2V0VmFsaWRhdG9yQWRkcmVzc2VzUmVxdWVzdBolLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXNwb25zZRJJCgxHZXRQdWJsaWNLZXkSGy5wYWN0dXMuR2V0UHVibGljS2V5UmVxdWVzdBocLnBhY3R1cy5HZXRQdWJsaWNLZXlSZXNwb25zZQ==');
final $typed_data.Uint8List blockchainServiceDescriptor = $convert.base64Decode('CgpCbG9ja2NoYWluEj0KCEdldEJsb2NrEhcucGFjdHVzLkdldEJsb2NrUmVxdWVzdBoYLnBhY3R1cy5HZXRCbG9ja1Jlc3BvbnNlEkkKDEdldEJsb2NrSGFzaBIbLnBhY3R1cy5HZXRCbG9ja0hhc2hSZXF1ZXN0GhwucGFjdHVzLkdldEJsb2NrSGFzaFJlc3BvbnNlEk8KDkdldEJsb2NrSGVpZ2h0Eh0ucGFjdHVzLkdldEJsb2NrSGVpZ2h0UmVxdWVzdBoeLnBhY3R1cy5HZXRCbG9ja0hlaWdodFJlc3BvbnNlElgKEUdldEJsb2NrY2hhaW5JbmZvEiAucGFjdHVzLkdldEJsb2NrY2hhaW5JbmZvUmVxdWVzdBohLnBhY3R1cy5HZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlElUKEEdldENvbnNlbnN1c0luZm8SHy5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1JlcXVlc3QaIC5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1Jlc3BvbnNlEkMKCkdldEFjY291bnQSGS5wYWN0dXMuR2V0QWNjb3VudFJlcXVlc3QaGi5wYWN0dXMuR2V0QWNjb3VudFJlc3BvbnNlEkkKDEdldFZhbGlkYXRvchIbLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXF1ZXN0GhwucGFjdHVzLkdldFZhbGlkYXRvclJlc3BvbnNlElkKFEdldFZhbGlkYXRvckJ5TnVtYmVyEiMucGFjdHVzLkdldFZhbGlkYXRvckJ5TnVtYmVyUmVxdWVzdBocLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXNwb25zZRJkChVHZXRWYWxpZGF0b3JBZGRyZXNzZXMSJC5wYWN0dXMuR2V0VmFsaWRhdG9yQWRkcmVzc2VzUmVxdWVzdBolLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXNwb25zZRJJCgxHZXRQdWJsaWNLZXkSGy5wYWN0dXMuR2V0UHVibGljS2V5UmVxdWVzdBocLnBhY3R1cy5HZXRQdWJsaWNLZXlSZXNwb25zZRJVChBHZXRUeFBvb2xDb250ZW50Eh8ucGFjdHVzLkdldFR4UG9vbENvbnRlbnRSZXF1ZXN0GiAucGFjdHVzLkdldFR4UG9vbENvbnRlbnRSZXNwb25zZQ==');
3 changes: 3 additions & 0 deletions www/grpc/gen/dart/blockchain.pbserver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ abstract class BlockchainServiceBase extends $pb.GeneratedService {
$async.Future<$1.GetValidatorResponse> getValidatorByNumber($pb.ServerContext ctx, $1.GetValidatorByNumberRequest request);
$async.Future<$1.GetValidatorAddressesResponse> getValidatorAddresses($pb.ServerContext ctx, $1.GetValidatorAddressesRequest request);
$async.Future<$1.GetPublicKeyResponse> getPublicKey($pb.ServerContext ctx, $1.GetPublicKeyRequest request);
$async.Future<$1.GetTxPoolContentResponse> getTxPoolContent($pb.ServerContext ctx, $1.GetTxPoolContentRequest request);

$pb.GeneratedMessage createRequest($core.String method) {
switch (method) {
Expand All @@ -39,6 +40,7 @@ abstract class BlockchainServiceBase extends $pb.GeneratedService {
case 'GetValidatorByNumber': return $1.GetValidatorByNumberRequest();
case 'GetValidatorAddresses': return $1.GetValidatorAddressesRequest();
case 'GetPublicKey': return $1.GetPublicKeyRequest();
case 'GetTxPoolContent': return $1.GetTxPoolContentRequest();
default: throw $core.ArgumentError('Unknown method: $method');
}
}
Expand All @@ -55,6 +57,7 @@ abstract class BlockchainServiceBase extends $pb.GeneratedService {
case 'GetValidatorByNumber': return this.getValidatorByNumber(ctx, request as $1.GetValidatorByNumberRequest);
case 'GetValidatorAddresses': return this.getValidatorAddresses(ctx, request as $1.GetValidatorAddressesRequest);
case 'GetPublicKey': return this.getPublicKey(ctx, request as $1.GetPublicKeyRequest);
case 'GetTxPoolContent': return this.getTxPoolContent(ctx, request as $1.GetTxPoolContentRequest);
default: throw $core.ArgumentError('Unknown method: $method');
}
}
Expand Down
Loading
Loading