Merge changes made for add provider/token constants and refactor core - #601
Open
gklps wants to merge 6 commits into
Open
Merge changes made for add provider/token constants and refactor core#601gklps wants to merge 6 commits into
gklps wants to merge 6 commits into
Conversation
…, updated with new struct, fix a typo : GetQuerry to GetQuery, include the APIReqPledgeToken in initiateTransfer [WIP:Breaking]
add wallet.Token type with model conversions, fix schema/model alignment for latest_position and latest_role, add BeginTx, use explicit column lists in token queries
Introduce BuildTransactionInfoFromRequest (transaction_builder.go) to collect and lock tokens for transfers; add token locking helpers (core/wallet/token_lock.go) and provider details batch upsert (core/wallet/provider_details.go). Rename sender/receiver to initiator/owner in DB schema and models (core/storage/schema.go, types/models/models.go). Remove the AsyncProviderDetailsManager and its usage, and add Wallet.BeginTx wrapper plus minor wallet struct/import adjustments.
Introduce new centralized constants for token statuses, IPFS provider function IDs, provider roles, token modes, and token sync statuses. Replace scattered wallet-based enums/usages with the new constants across core packages (core, fullnode, quorum_*, recover, token handling, pin/check, validation and chain sync logic). Add a new wallet/ipfs_service.go (provider-aware Pin implementation) and remove the old core/service/service.go; also remove/adjust service usage in Core struct (srv commented) and related imports. These changes consolidate role/function identifiers and prepare codepaths for provider-based IPFS pin/unpin and sync handling.
Rename AsyncPinJob fields (Sender, Receiver) to Initator and Owner and update SubmitPinJob signature accordingly. Replace wallet role/func constants with constants.ProviderRole_QuorumPin and constants.ProviderFunc_Pin. Reduce status monitor frequency to 60s, tidy up worker/init code and minor whitespace/formatting cleanups. No functional change to provider map persistence; concurrency/ batching logic and retry behavior remain intact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce new centralized constants for token statuses, IPFS provider function IDs, provider roles, token modes, and token sync statuses. Replace scattered wallet-based enums/usages with the new constants across core packages (core, fullnode, quorum_*, recover, token handling, pin/check, validation and chain sync logic). Add a new wallet/ipfs_service.go (provider-aware Pin implementation) and remove the old core/service/service.go; also remove/adjust service usage in Core struct (srv commented) and related imports. These changes consolidate role/function identifiers and prepare codepaths for provider-based IPFS pin/unpin and sync handling. Rename AsyncPinJob fields (Sender, Receiver) to Initator and Owner and update SubmitPinJob signature accordingly. Replace wallet role/func constants with constants.ProviderRole_QuorumPin and constants.ProviderFunc_Pin. Reduce status monitor frequency to 60s, tidy up worker/init code and minor whitespace/formatting cleanups. No functional change to provider map persistence; concurrency/ batching logic and retry behavior remain intact.