Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T transactionCC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • smartcontracts
  • transactionCC
  • Issues
  • #9

Closed
Open
Created Dec 02, 2017 by Ghost User@ghost

Добавить генерацию для operationID при загрузки средств в канал транзакций из внешних кошельков

На данном этапе в канале транзакций при добавление и вводе средств с внешних кошельков отсутствует часть записи отвечающая за operationID. Т.е. по сути запись в реестр выглядит следующим образом

	// OUT
	if err := (&TransactionRecord{
		Key:          outKey,
		CurrencyType: cryptocurrencyStore.CurrencyType,
		User: UserAccountInfo{
			// Keep default values for time being, has to be replaced with
			// call to system chaincode to obtain system user and account information
			UserID: "systemUserID",
			AccountInfo: AccountInfo{
				cryptocurrencyStore.OutAccountInfo.WalletID,
				cryptocurrencyStore.OutAccountInfo.AccountID,
			},
		},
		Amount:        cryptocurrencyStore.Amount,
		OperationID:   "", // TODO: Where to get the operation ID?
		OperationType: TransferAmountToUser,
		ProcessType:   DepositFunds,
		HashCode:      "", // TODO: Ask what is the meaning of the hash code here
		DependencyKey: inKey,
		Timestamp:     tt,
	}).Save(adapter); err != nil {
		return err
	}

и зеркальная часть транзакции

	// IN
	if err := (&TransactionRecord{
		Key:          inKey,
		CurrencyType: cryptocurrencyStore.CurrencyType,
		// Key and the account information should be aligned together
		// TODO: Check whenever inKey and user information filled as appropriate
		User: UserAccountInfo{
			UserID: cryptocurrencyStore.InAccountInfo.UserID,
			AccountInfo: AccountInfo{
				WalletID:  cryptocurrencyStore.InAccountInfo.WalletID,
				AccountID: cryptocurrencyStore.InAccountInfo.AccountID,
			},
		},
		Amount:        cryptocurrencyStore.Amount,
		OperationID:   "",
		OperationType: TransferAmountToUser,
		ProcessType:   DepositFunds,
		HashCode:      "", // TODO: Ask what is the meaning of the hash code here
		DependencyKey: outKey,
		Timestamp:     tt,
	}).Save(adapter); err != nil {
		return err
	}

т.е. operationID отсутствует в обоих случаях.

Необходимо разобраться и решить каким образом этот ID будет генерироваться и поддерживаться в системе. Как одна из возможных альтернатив, может быть добавление транзакций ввода средств на уровне scheudler'а который и будет учитывать и обеспечивать уникальность.

@yandrevv почитай пожалуйста и проверь.

Edited Dec 02, 2017 by Ghost User
Assignee
Assign to
Time tracking