From a1268f7ae3e688144a613c8a439dd31818aae07d Mon Sep 17 00:00:00 2001 From: santamasa <0xstarker@gmail.com> Date: Wed, 20 Nov 2024 02:37:59 +0300 Subject: [PATCH] Typo fix Update adr-002-ipld-da-sampling.md (#1535) ## Description Fix Typographical Errors in Function Descriptions This pull request addresses and fixes critical typographical errors in the descriptions of several functions that affect code clarity and correctness. #### Fixed Issues: 1. **Typo in "contex.Context"**: - In the descriptions of the following functions: `ValidateAvailability`, `RetrieveBlockData`, and `PutBlock`, the reference to **"contex.Context"** has been corrected to **"context.Context"**. - **Importance**: This correction is crucial as the incorrect spelling could lead to confusion or misinterpretation of the intended type, especially for developers referencing or using these functions. Proper naming ensures clarity, adherence to Go standards, and minimizes potential errors or misunderstandings in documentation and code navigation. #### PR checklist - [x] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [x] Updated relevant documentation (`docs/` or `spec/`) and code comments --- **Please review and consider merging this fix. Thank you!** --- docs/celestia-architecture/adr-002-ipld-da-sampling.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/celestia-architecture/adr-002-ipld-da-sampling.md b/docs/celestia-architecture/adr-002-ipld-da-sampling.md index b95975375a..91f7c3c808 100644 --- a/docs/celestia-architecture/adr-002-ipld-da-sampling.md +++ b/docs/celestia-architecture/adr-002-ipld-da-sampling.md @@ -143,7 +143,7 @@ It does not deal with IPFS internals. // The context can be used to provide a timeout. // TODO: Should there be a constant = lower bound for #samples func ValidateAvailability( - ctx contex.Context, + ctx context.Context, dah *DataAvailabilityHeader, numSamples int, onLeafValidity func(namespace.PrefixedData8), @@ -154,7 +154,7 @@ func ValidateAvailability( // The key difference is that it will sample enough chunks until it can recover the // full extended data square, including original data (e.g. by using rsmt2d.RepairExtendedDataSquare). func RetrieveBlockData( - ctx contex.Context, + ctx context.Context, dah *DataAvailabilityHeader, api coreiface.CoreAPI, codec rsmt2d.Codec, @@ -166,7 +166,7 @@ func RetrieveBlockData( // the row to the Merkle Dag, in our case a Namespaced Merkle Tree. // Note, that this method could also fill the DA header. // The data will be pinned by default. -func (b *Block) PutBlock(ctx contex.Context, nodeAdder ipld.NodeAdder) error +func (b *Block) PutBlock(ctx context.Context, nodeAdder ipld.NodeAdder) error ``` We now describe the lower-level library that will be used by above methods.