Skip to content

Commit

Permalink
Merge pull request #58 from kaleido-io/txstatus-input
Browse files Browse the repository at this point in the history
Suggestions on TODOs and comments/naming for TX History API
  • Loading branch information
matthew1001 authored Jan 30, 2023
2 parents 952269d + 8854bfc commit fefbd94
Show file tree
Hide file tree
Showing 21 changed files with 530 additions and 329 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"Tracef",
"txcommon",
"txcommonmocks",
"txhistory",
"txid",
"txns",
"txtype",
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ endef

$(eval $(call makemock, pkg/ffcapi, API, ffcapimocks))
$(eval $(call makemock, pkg/policyengine, PolicyEngine, policyenginemocks))
$(eval $(call makemock, pkg/txhistory, Manager, txhistorymocks))
$(eval $(call makemock, internal/confirmations, Manager, confirmationsmocks))
$(eval $(call makemock, internal/persistence, Persistence, persistencemocks))
$(eval $(call makemock, internal/ws, WebSocketChannels, wsmocks))
Expand Down
2 changes: 0 additions & 2 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@

|Key|Description|Type|Default Value|
|---|-----------|----|-------------|
|maxHistoryActions|The number of actions to store per historical status updates|`int`|`50`
|maxHistoryCount|The number of historical status updates to retain in the operation|`int`|`50`
|maxHistorySummaryCount|The number of historical status summary records to retain in the operation|`int`|`50`
|maxInFlight|The maximum number of transactions to have in-flight with the policy engine / blockchain transaction pool|`int`|`100`
|nonceStateTimeout|How old the most recently submitted transaction record in our local state needs to be, before we make a request to the node to query the next nonce for a signing address|[`time.Duration`](https://pkg.go.dev/time#Duration)|`1h`

Expand Down
3 changes: 2 additions & 1 deletion internal/confirmations/confirmations.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2023 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand All @@ -13,6 +13,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package confirmations

import (
Expand Down
4 changes: 0 additions & 4 deletions internal/tmconfig/tmconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ var (
ConfirmationsStaleReceiptTimeout = ffc("confirmations.staleReceiptTimeout")
ConfirmationsNotificationQueueLength = ffc("confirmations.notificationQueueLength")
TransactionsMaxHistoryCount = ffc("transactions.maxHistoryCount")
TransactionsMaxHistorySummaryCount = ffc("transactions.maxHistorySummaryCount")
TransactionsMaxHistoryActions = ffc("transactions.maxHistoryActions")
TransactionsMaxInFlight = ffc("transactions.maxInFlight")
TransactionsNonceStateTimeout = ffc("transactions.nonceStateTimeout")
PolicyLoopInterval = ffc("policyloop.interval")
Expand Down Expand Up @@ -77,8 +75,6 @@ var MetricsConfig config.Section
func setDefaults() {
viper.SetDefault(string(TransactionsMaxInFlight), 100)
viper.SetDefault(string(TransactionsMaxHistoryCount), 50)
viper.SetDefault(string(TransactionsMaxHistorySummaryCount), 50)
viper.SetDefault(string(TransactionsMaxHistoryActions), 50)
viper.SetDefault(string(TransactionsNonceStateTimeout), "1h")
viper.SetDefault(string(ConfirmationsRequired), 20)
viper.SetDefault(string(ConfirmationsBlockQueueLength), 50)
Expand Down
17 changes: 16 additions & 1 deletion mocks/confirmationsmocks/manager.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion mocks/eventsmocks/stream.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion mocks/persistencemocks/persistence.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 20 additions & 5 deletions mocks/policyenginemocks/policy_engine.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions mocks/txhistorymocks/manager.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion mocks/wsmocks/web_socket_channels.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fefbd94

Please sign in to comment.