FactomProject / factom

Library for writing Factom clients in go
MIT License
44 stars 19 forks source link

Standardize EC Output naming #151

Closed WhoSoup closed 4 years ago

WhoSoup commented 4 years ago

This was noticed by @ilzheev: The naming of the entry credit outputs was inconsistent across the library.

The FBlock had OutECs: https://github.com/FactomProject/factom/blob/7b8f2b8eb473881c1153e6cdcabad6dd885adf43/fblock.go#L38

Whereas Transactions/Pending Transactions had ECOutputs: https://github.com/FactomProject/factom/blob/7b8f2b8eb473881c1153e6cdcabad6dd885adf43/transaction.go#L35 https://github.com/FactomProject/factom/blob/7b8f2b8eb473881c1153e6cdcabad6dd885adf43/transaction_pending.go#L15

This PR renames the FBlock variable to ECOutputs. Both the parsing of FBlock outputs and Pending Transactions are new additions in this release, whereas Transaction.ECOutputs is the one that may actually be in use. Plus, I prefer "ECOutputs" to "OutECs".

The root cause is an inconsistency in the factomd api itself, due to inconsistent naming there. However, that's not something we can fix without API changes, so that would be slated for V3.