Skip to content

Commit fefbd94

Browse files
authored
Merge pull request #58 from kaleido-io/txstatus-input
Suggestions on TODOs and comments/naming for TX History API
2 parents 952269d + 8854bfc commit fefbd94

File tree

21 files changed

+530
-329
lines changed

21 files changed

+530
-329
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"Tracef",
8585
"txcommon",
8686
"txcommonmocks",
87+
"txhistory",
8788
"txid",
8889
"txns",
8990
"txtype",

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ endef
3333

3434
$(eval $(call makemock, pkg/ffcapi, API, ffcapimocks))
3535
$(eval $(call makemock, pkg/policyengine, PolicyEngine, policyenginemocks))
36+
$(eval $(call makemock, pkg/txhistory, Manager, txhistorymocks))
3637
$(eval $(call makemock, internal/confirmations, Manager, confirmationsmocks))
3738
$(eval $(call makemock, internal/persistence, Persistence, persistencemocks))
3839
$(eval $(call makemock, internal/ws, WebSocketChannels, wsmocks))

config.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,7 @@
241241

242242
|Key|Description|Type|Default Value|
243243
|---|-----------|----|-------------|
244-
|maxHistoryActions|The number of actions to store per historical status updates|`int`|`50`
245244
|maxHistoryCount|The number of historical status updates to retain in the operation|`int`|`50`
246-
|maxHistorySummaryCount|The number of historical status summary records to retain in the operation|`int`|`50`
247245
|maxInFlight|The maximum number of transactions to have in-flight with the policy engine / blockchain transaction pool|`int`|`100`
248246
|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`
249247

internal/confirmations/confirmations.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright © 2022 Kaleido, Inc.
1+
// Copyright © 2023 Kaleido, Inc.
22
//
33
// SPDX-License-Identifier: Apache-2.0
44
//
@@ -13,6 +13,7 @@
1313
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
16+
1617
package confirmations
1718

1819
import (

internal/tmconfig/tmconfig.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ var (
3131
ConfirmationsStaleReceiptTimeout = ffc("confirmations.staleReceiptTimeout")
3232
ConfirmationsNotificationQueueLength = ffc("confirmations.notificationQueueLength")
3333
TransactionsMaxHistoryCount = ffc("transactions.maxHistoryCount")
34-
TransactionsMaxHistorySummaryCount = ffc("transactions.maxHistorySummaryCount")
35-
TransactionsMaxHistoryActions = ffc("transactions.maxHistoryActions")
3634
TransactionsMaxInFlight = ffc("transactions.maxInFlight")
3735
TransactionsNonceStateTimeout = ffc("transactions.nonceStateTimeout")
3836
PolicyLoopInterval = ffc("policyloop.interval")
@@ -77,8 +75,6 @@ var MetricsConfig config.Section
7775
func setDefaults() {
7876
viper.SetDefault(string(TransactionsMaxInFlight), 100)
7977
viper.SetDefault(string(TransactionsMaxHistoryCount), 50)
80-
viper.SetDefault(string(TransactionsMaxHistorySummaryCount), 50)
81-
viper.SetDefault(string(TransactionsMaxHistoryActions), 50)
8278
viper.SetDefault(string(TransactionsNonceStateTimeout), "1h")
8379
viper.SetDefault(string(ConfirmationsRequired), 20)
8480
viper.SetDefault(string(ConfirmationsBlockQueueLength), 50)

mocks/confirmationsmocks/manager.go

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mocks/eventsmocks/stream.go

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mocks/persistencemocks/persistence.go

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mocks/policyenginemocks/policy_engine.go

Lines changed: 20 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mocks/txhistorymocks/manager.go

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)