From 7a535ff5b66f25f8b3847a05dc140293b6951fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Davill=C3=A9?= Date: Mon, 25 Mar 2024 11:52:39 +0100 Subject: [PATCH] add maxSupportedTransactionVersion to blockSubscribe --- rpc/ws/blockSubscribe.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpc/ws/blockSubscribe.go b/rpc/ws/blockSubscribe.go index 9fdbfba9..e1530f11 100644 --- a/rpc/ws/blockSubscribe.go +++ b/rpc/ws/blockSubscribe.go @@ -67,6 +67,10 @@ type BlockSubscribeOpts struct { // Whether to populate the rewards array. If parameter not provided, the default includes rewards. Rewards *bool + + // Max transaction version to return in responses. + // If the requested block contains a transaction with a higher version, an error will be returned. + MaxSupportedTransactionVersion *uint64 } // NOTE: Unstable, disabled by default @@ -114,6 +118,9 @@ func (cl *Client) BlockSubscribe( if opts.Rewards != nil { obj["rewards"] = opts.Rewards } + if opts.MaxSupportedTransactionVersion != nil { + obj["maxSupportedTransactionVersion"] = *opts.MaxSupportedTransactionVersion + } if len(obj) > 0 { params = append(params, obj) }