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

Fix typos #168

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
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 babylonclient/msgsender.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func newSendUndelegationRequest(
// BabylonMsgSender is responsible for sending delegation and undelegation requests to babylon
// It makes sure:
// - that babylon is ready for either delgetion or undelegation
// - only one messegae is sent to babylon at a time
// - only one message is sent to babylon at a time
type BabylonMsgSender struct {
startOnce sync.Once
stopOnce sync.Once
Expand Down Expand Up @@ -254,7 +254,7 @@ func (m *BabylonMsgSender) SendDelegation(

}

// TODO: Curenttly not used.
// TODO: Currently not used.
// We may introduce the option for staker to self report unbonding tx to babylon.
func (m *BabylonMsgSender) SendUndelegation(
ur *UndelegationRequest,
Expand Down
2 changes: 1 addition & 1 deletion cmd/stakercli/daemon/daemoncommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ var stakeCmd = cli.Command{
var unstakeCmd = cli.Command{
Name: "unstake",
ShortName: "ust",
Usage: "Spends staking transaction and sends funds back to staker; this can only be done after timelock of staking transaction expires",
Usage: "Spends staking transaction and sends funds back to staker; this can only be done after the timelock of staking transaction expires",
Flags: []cli.Flag{
cli.StringFlag{
Name: stakingDaemonAddressFlag,
Expand Down
2 changes: 1 addition & 1 deletion cmd/stakercli/transaction/staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type InputBtcStakingTx struct {
CovenantQuorum uint32 `json:"covenant_quorum"`
}

// ToCreatePhase1StakingTxResponse from the data input parses and build parameters to create and serialize response tx structure.
// ToCreatePhase1StakingTxResponse from the data input parses and builds parameters to create and serialize response tx structure.
func (tx InputBtcStakingTx) ToCreatePhase1StakingTxResponse() (*CreatePhase1StakingTxResponse, error) {
magicBytes, err := parseMagicBytesFromHex(tx.MagicBytesHex)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion itest/containers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (m *Manager) ExecBitcoindCliCmd(t *testing.T, command []string) (bytes.Buff

// ExecCmd executes command by running it on the given container.
// It word for word `error` in output to discern between error and regular output.
// It retures stdout and stderr as bytes.Buffer and an error if the command fails.
// It returns stdout and stderr as bytes.Buffer and an error if the command fails.
func (m *Manager) ExecCmd(t *testing.T, containerName string, command []string) (bytes.Buffer, bytes.Buffer, error) {
if _, ok := m.resources[containerName]; !ok {
return bytes.Buffer{}, bytes.Buffer{}, fmt.Errorf("no resource %s found", containerName)
Expand Down
2 changes: 1 addition & 1 deletion itest/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var (
eventuallyPollTime = 250 * time.Millisecond
)

// keyToAddr maps the passed private to corresponding p2pkh address.
// keyToAddr maps the passed private to the corresponding p2pkh address.
func keyToAddr(key *btcec.PrivateKey, net *chaincfg.Params) (btcutil.Address, error) {
serializedKey := key.PubKey().SerializeCompressed()
pubKeyAddr, err := btcutil.NewAddressPubKey(serializedKey, net)
Expand Down
6 changes: 3 additions & 3 deletions staker/babylontypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/sirupsen/logrus"
)

// TODO: All functions and types declared in this file should be moved to separate package
// TODO: All functions and types declared in this file should be moved to a separate package
// and be part of new module which will be responsible for communication with babylon chain i.e
// retrieving data from babylon chain, sending data to babylon chain, queuing data to be send etc.
// retrieving data from babylon chain, sending data to babylon chain, queuing data to be sent etc.

type sendDelegationRequest struct {
txHash chainhash.Hash
Expand Down Expand Up @@ -70,7 +70,7 @@ func (app *StakerApp) buildOwnedDelegation(
)

if err != nil {
// TODO: Most probable couse for this error would be some kind of problem with fees
// TODO: Most probable cause for this error would be some kind of problem with fees
return nil, fmt.Errorf("error creating undelegation data: %w", err)
}

Expand Down
2 changes: 1 addition & 1 deletion staker/nodebackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type NodeBackend struct {

// TODO This should be moved to a more appropriate place, most probably to config
// and be connected to validation of rpc host/port.
// According to chain.BitcoindConfig docs it should also support tor if node backend
// According to chain.BitcoindConfig docs it should also support tor if the node backend
// works over tor.
func BuildDialer(rpcHost string) func(string) (net.Conn, error) {
return func(addr string) (net.Conn, error) {
Expand Down
4 changes: 2 additions & 2 deletions staker/stakerapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const (
// this gives us 904 satoshi fee. Lets round it 1000 satoshi
minSlashingFee = btcutil.Amount(1000)

// after this many confirmations we consider transaction which spends staking tx as
// after this many confirmations we consider transaction that spends staking tx as
// confirmed on btc
SpendStakeTxConfirmations = 3

Expand Down Expand Up @@ -265,7 +265,7 @@ func NewStakerAppFromDeps(
unbondingTxConfirmedOnBtcEvChan: make(chan *unbondingTxConfirmedOnBtcEvent),

// channel which receives critical errors, critical errors are errors which we do not know
// how to handle, so we just log them. It is up to user to investigate, what had happend
// how to handle them, so we just log them. It is up to the user to investigate, what had happened
// and report the situation
criticalErrorEvChan: make(chan *criticalErrorEvent),
}, nil
Expand Down