Skip to content

Commit

Permalink
Requests to access node use CCF encoding from now on (#53)
Browse files Browse the repository at this point in the history
* Requests to access node use CCF encoding from now on

* decode payload via ccf

* update root block and spork id

* Upgrade go version, flow-go and core-contracts deps
  • Loading branch information
illia-malachyn authored May 27, 2024
1 parent bab50a2 commit d5760ae
Show file tree
Hide file tree
Showing 6 changed files with 484 additions and 521 deletions.
22 changes: 14 additions & 8 deletions access/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ func (c Client) BlockEvents(ctx context.Context, blockID []byte, typ string) ([]
resp, err := c.client.GetEventsForBlockIDs(
ctx,
&access.GetEventsForBlockIDsRequest{
BlockIds: [][]byte{blockID},
Type: typ,
BlockIds: [][]byte{blockID},
Type: typ,
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
},
)
cancel()
Expand Down Expand Up @@ -386,7 +387,8 @@ func (c Client) Transaction(ctx context.Context, hash []byte) (*entities.Transac
resp, err := c.client.GetTransaction(
ctx,
&access.GetTransactionRequest{
Id: hash,
Id: hash,
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
},
)
cancel()
Expand All @@ -406,8 +408,9 @@ func (c Client) TransactionResult(ctx context.Context, blockID []byte, txnIndex
resp, err := c.client.GetTransactionResultByIndex(
ctx,
&access.GetTransactionByIndexRequest{
BlockId: blockID,
Index: txnIndex,
BlockId: blockID,
Index: txnIndex,
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
},
)
cancel()
Expand All @@ -428,7 +431,8 @@ func (c Client) TransactionResultByHash(ctx context.Context, hash []byte) (*acce
resp, err := c.client.GetTransactionResult(
ctx,
&access.GetTransactionRequest{
Id: hash,
Id: hash,
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
},
)
cancel()
Expand All @@ -453,7 +457,8 @@ func (c Client) TransactionResultsByBlockID(ctx context.Context, blockID []byte)
resp, err := c.client.GetTransactionResultsByBlockID(
ctx,
&access.GetTransactionsByBlockIDRequest{
BlockId: blockID,
BlockId: blockID,
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
},
)
cancel()
Expand All @@ -473,7 +478,8 @@ func (c Client) TransactionsByBlockID(ctx context.Context, blockID []byte) ([]*e
resp, err := c.client.GetTransactionsByBlockID(
ctx,
&access.GetTransactionsByBlockIDRequest{
BlockId: blockID,
BlockId: blockID,
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
},
)
cancel()
Expand Down
Loading

0 comments on commit d5760ae

Please sign in to comment.