Skip to content

Commit 96321d8

Browse files
authored
Merge pull request #672 from eroderust/master
chore: fix some minor issues in the comments
2 parents 29542e5 + 3805e0f commit 96321d8

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

escrow/escrow.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// lockingPaymentChannelService implements PaymentChannelService interface
1212
// using locks around proxied service call to guarantee that only one payment
13-
// at time is applied to channel
13+
// at a time is applied to channel
1414
type lockingPaymentChannelService struct {
1515
storage *PaymentChannelStorage
1616
paymentStorage *PaymentStorage
@@ -52,8 +52,8 @@ func (h *lockingPaymentChannelService) PaymentChannel(key *PaymentChannelKey) (c
5252
blockchainChannel, blockchainOk, err := h.blockchainReader.GetChannelStateFromBlockchain(key)
5353

5454
if !storageOk {
55-
// Group ID check is only done for the first time, when the channel is added to storage from the blockchain,
56-
// if the channel is already present in the storage, the group ID check is skipped.
55+
// Group ID check is only done for the first time, when the channel is added to storage from the blockchain.
56+
// If the channel is already present in the storage, the group ID check is skipped.
5757
if blockchainChannel != nil {
5858
blockChainGroupID := h.replicaGroupID()
5959
if err = h.verifyGroupId(blockChainGroupID, blockchainChannel.GroupID); err != nil {

escrow/payment_channel_storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func NewBlockchainChannelReader(processor blockchain.Processor, cfg *viper.Viper
107107
}
108108

109109
// GetChannelStateFromBlockchain returns channel state from Ethereum
110-
// blockchain. ok is false if the channel was not found.
110+
// blockchain. ok is false if the channel is not found.
111111
func (reader *BlockchainChannelReader) GetChannelStateFromBlockchain(key *PaymentChannelKey) (channel *PaymentChannelData, ok bool, err error) {
112112
ch, ok, err := reader.readChannelFromBlockchain(key.ID)
113113
if err != nil || !ok {

escrow/state_service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (service *BlockChainDisabledStateService) GetChannelState(context context.C
4646
return &ChannelStateReply{}, nil
4747
}
4848

49-
// verifies whether storage channel nonce is equal to blockchain nonce or not
49+
// StorageNonceMatchesWithBlockchainNonce verifies whether storage channel nonce is equal to blockchain nonce or not
5050
func (service *PaymentChannelStateService) StorageNonceMatchesWithBlockchainNonce(storageChannel *PaymentChannelData) (equal bool, err error) {
5151
h := service.channelService
5252

@@ -128,7 +128,7 @@ func (service *PaymentChannelStateService) GetChannelState(context context.Conte
128128
return nil, err
129129

130130
} else if !nonceEqual {
131-
// check for payments in the payment storage with current nonce - 1, this will happen cli has issues in claiming process
131+
// check for payments in the payment storage with current nonce - 1, this will happen if cli has issues in claiming process
132132

133133
paymentID := PaymentID(channel.ChannelID, (&big.Int{}).Sub(channel.Nonce, big.NewInt(1)))
134134
payment, ok, err := service.paymentStorage.Get(paymentID)

handler/stream_interceptor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ const (
4545
// PaymentChannelSignatureHeader is a signature of the client to confirm
4646
// amount withdrawing authorization. Value is an array of bytes.
4747
PaymentChannelSignatureHeader = "snet-payment-channel-signature-bin"
48-
// This is useful information in the header sent in by the client
48+
// This is useful information in the header sent by the client
4949
// All clients will have this information and they need this to Sign anyways
50-
// When Daemon is running in the block chain disabled mode , it would use this
50+
// When Daemon is running in the block chain disabled mode, it would use this
5151
// header to get the MPE address. The goal here is to keep the client oblivious to the
5252
// Daemon block chain enabled or disabled mode and also standardize the signatures.
5353
// id. Value is a string containing a decimal number.

0 commit comments

Comments
 (0)