Nyzo techRelease notesNyzo 621: indexed search options

Nyzo 621: indexed search options

Nyzo version 621 (commit on GitHub) adds options to TransactionIndexedSearchCommand to make this command more useful.

This version affects the client only.

In CommandEndpointWeb.getProgressPage(), the back button was made slightly friendlier. Before, it would always go back to the root of the client. Now, it goes back to the form for any commands that have forms.

As the TODO notes, adding the argument values to the link would further improve this behavior.

Later in the same method, one of the null arguments to SimpleExecutionResult was removed when an error result is produced. This is due to a reordering of the arguments in this constructor to support a variable number of CommandTable objects. Instead of passing null for the CommandTable, this result now omits the CommandTable.

RN_621 image 0

In SimpleExecutionResult, the single CommandTable was replaced with an array of CommandTable objects.

RN_621 image 1

In SimpleExecutionResult.toHtml(), the array of tables is now rendered. Rendering is the same; the large number of changed lines is due to nesting in the loop. Also, the result has been replaced by table, which is an element of result. This section of code is the case where rows and columns are inverted (headers at left instead of top).

RN_621 image 2

This section of code renders the headers for the non-inverted (headers at top) case.

RN_621 image 3

This section of code renders the data for the non-inverted case.

RN_621 image 4

In SimpleExecutionResult.toConsole(), the array of CommandTable objects is now printed.

RN_621 image 5

In SimpleExecutionResult.toJson(), a condition was added for rendering an array of CommandTable objects. This method was written to render a single CommandTable exactly as it was rendered before while nesting multiple CommandTable objects within a JSON array.

RN_621 image 6

The searchPrefix, senderReceiverFlag, minimumTimestamp, maximumTimestamp, minimumBlockHeight, and maximumBlockHeight arguments were added to the TransactionIndexer.transactionsForAccount() method. These arguments are all used to filter the transactions retrieved by this method. Before reading the file, some work is done on the arguments to allow for more efficient filtering.

RN_621 image 7

The TODO notes some improvements that are necessary in the near future for this method and the associated command. The comment, which incorrectly stated that a list of timestamps was being built, was corrected to state that a list of offsets is being built.

RN_621 image 8

Instead of adding all offsets as they are encountered, the filters are now considered before adding a transaction's offset to the list.

RN_621 image 9

The change of the SimpleExecutionResult constructor required changes in numerous commands. The first of these is BalanceDisplayCommand.

RN_621 image 10

The SimpleExecutionResult constructor call was updated in ClientHealthCommand.

RN_621 image 11

The SimpleExecutionResult constructor call was updated in CoinsInCirculationCommand.

RN_621 image 12

The SimpleExecutionResult constructor call was updated in CycleTransactionListCommand.

RN_621 image 13

The SimpleExecutionResult constructor call was updated in FrozenEdgeCommand.

RN_621 image 14

The SimpleExecutionResult constructor call was updated in NttpDataGenerateCommand.

RN_621 image 15

The SimpleExecutionResult constructor call was updated in PrefilledDataCreateCommand.

RN_621 image 16

The SimpleExecutionResult constructor call was updated in PrivateNyzoStringCommand.

RN_621 image 17

The SimpleExecutionResult constructor call was updated in PublicNyzoStringCommand.

RN_621 image 18

The SimpleExecutionResult constructor call was updated in TransactionForwardCommand.

RN_621 image 19

The new filtering arguments were added to TransactionIndexedSearchCommand.

RN_621 image 20

In TransactionIndexedSearchCommand.run(), the new arguments are retrieved. The notices were removed, as they are now added later to a supplemental table.

The single result table was renamed to transactionTable.

RN_621 image 21

The new arguments are passed to TransactionIndexer.transactionsForAccount().

RN_621 image 22

A supplementalTable was added with the information previously contained in the notices. This provides better structure, especially in the JSON form.

RN_621 image 23

The SimpleExecutionResult constructor call was updated in TransactionSearchCommand.

RN_621 image 24

In TransactionIndexerTest, negative timestamps were eliminated to avoid complications with the new timestamp filter. The call to TransactionIndexer.transactionsForAccount() now includes the new arguments, though the behavior of these arguments is not yet tested.

RN_621 image 25