{"action":"created","comment":{"url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/comments/205241945","pull_request_review_id":140474594,"id":205241945,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTI0MTk0NQ==","diff_hunk":"@@ -279,6 +254,45 @@ func (x *Start) Execute(args []string) error {\n \t\treturn err\n \t}\n \n+\tif x.BitcoinCash {\n+\t\twalletCfg.Type = \"bitcoincash\"\n+\t} else if x.ZCash != \"\" {\n+\t\twalletCfg.Type = \"zcashd\"\n+\t\twalletCfg.Binary = x.ZCash\n+\t}\n+\n+\tct := wallet.Bitcoin\n+\tswitch(walletCfg.Type) {\n+\tcase \"bitcoincash\":\n+\t\tct = wallet.BitcoinCash\n+\tcase \"zcashd\":\n+\t\tct = wallet.Zcash\n+\t}\n+\tsqliteDB, err := InitializeRepo(repoPath, x.Password, \"\", isTestnet, time.Now(), ct)\n+\tif err != nil && err != repo.ErrRepoExists {\n+\t\treturn err\n+\t}\n+\n+\t// If the database cannot be decrypted, exit\n+\tif sqliteDB.Config().IsEncrypted() {\n+\t\tsqliteDB.Close()\n+\t\tfmt.Print(\"Database is encrypted, enter your password: \")\n+\t\tbytePassword, _ := terminal.ReadPassword(int(syscall.Stdin))\n+\t\tfmt.Println(\"\")\n+\t\tpw := string(bytePassword)\n+\t\tsqliteDB, err = InitializeRepo(repoPath, pw, \"\", isTestnet, time.Now(), ct)\n+\t\tif err != nil && err != repo.ErrRepoExists {\n+\t\t\treturn err\n+\t\t}\n+\t\tif sqliteDB.Config().IsEncrypted() {\n+\t\t\tlog.Error(\"Invalid password\")\n+\t\t\tos.Exit(3)\n+\t\t}\n+\t}\n+\n+\t// Get creation date. Ignore the error and use a default timestamp.\n+\tcreationDate, _ := sqliteDB.Config().GetCreationDate()","path":"cmd/start.go","position":90,"original_position":80,"commit_id":"001a618275334d8a5eceb62ca79b2ee6f1bb9af5","original_commit_id":"9fb27aa7dbb47c48cb2c643633b4d53607804665","user":{"login":"tyler-smith","id":2145522,"node_id":"MDQ6VXNlcjIxNDU1MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/2145522?v=4","gravatar_id":"","url":"https://api.github.com/users/tyler-smith","html_url":"https://github.com/tyler-smith","followers_url":"https://api.github.com/users/tyler-smith/followers","following_url":"https://api.github.com/users/tyler-smith/following{/other_user}","gists_url":"https://api.github.com/users/tyler-smith/gists{/gist_id}","starred_url":"https://api.github.com/users/tyler-smith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyler-smith/subscriptions","organizations_url":"https://api.github.com/users/tyler-smith/orgs","repos_url":"https://api.github.com/users/tyler-smith/repos","events_url":"https://api.github.com/users/tyler-smith/events{/privacy}","received_events_url":"https://api.github.com/users/tyler-smith/received_events","type":"User","site_admin":false},"body":"I would try to log that there was an error and that block sync will start from the beginning.","created_at":"2018-07-25T19:55:54Z","updated_at":"2018-07-25T19:55:54Z","html_url":"https://github.com/OpenBazaar/openbazaar-go/pull/1009#discussion_r205241945","pull_request_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/1009","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/comments/205241945"},"html":{"href":"https://github.com/OpenBazaar/openbazaar-go/pull/1009#discussion_r205241945"},"pull_request":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/1009"}},"in_reply_to_id":201136563},"pull_request":{"url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/1009","id":200047582,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMDQ3NTgy","html_url":"https://github.com/OpenBazaar/openbazaar-go/pull/1009","diff_url":"https://github.com/OpenBazaar/openbazaar-go/pull/1009.diff","patch_url":"https://github.com/OpenBazaar/openbazaar-go/pull/1009.patch","issue_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1009","number":1009,"state":"open","locked":false,"title":"Migrate wallet database tables","user":{"login":"cpacia","id":4504708,"node_id":"MDQ6VXNlcjQ1MDQ3MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/4504708?v=4","gravatar_id":"","url":"https://api.github.com/users/cpacia","html_url":"https://github.com/cpacia","followers_url":"https://api.github.com/users/cpacia/followers","following_url":"https://api.github.com/users/cpacia/following{/other_user}","gists_url":"https://api.github.com/users/cpacia/gists{/gist_id}","starred_url":"https://api.github.com/users/cpacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpacia/subscriptions","organizations_url":"https://api.github.com/users/cpacia/orgs","repos_url":"https://api.github.com/users/cpacia/repos","events_url":"https://api.github.com/users/cpacia/events{/privacy}","received_events_url":"https://api.github.com/users/cpacia/received_events","type":"User","site_admin":false},"body":"Migrates the db tables used by the wallet to have a `coin` column so that multiple coin implementations can share the same database.\r\n\r\nCurrently db structs are created as part of the `SQLiteDatastore` object but once the multiwallet is in we'll move the creation of the structs into the wallet constructor. Each wallet will create it's own db struct with the tables it needs. \r\n\r\nBut for now this means the `cointype` needs to be determined on startup and passed into the db package so that the tables use the correct cointype. But this wont be necessary after the multiwallet refactor as each wallet knows its own cointype and will initialize the struct itself.","created_at":"2018-07-09T09:54:55Z","updated_at":"2018-07-25T19:55:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"170437dc876dcf193134ad61ac3e6f68b61b3aa9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/1009/commits","review_comments_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/1009/comments","review_comment_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1009/comments","statuses_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/statuses/001a618275334d8a5eceb62ca79b2ee6f1bb9af5","head":{"label":"OpenBazaar:db","ref":"db","sha":"001a618275334d8a5eceb62ca79b2ee6f1bb9af5","user":{"login":"OpenBazaar","id":7438770,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzg3NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/7438770?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenBazaar","html_url":"https://github.com/OpenBazaar","followers_url":"https://api.github.com/users/OpenBazaar/followers","following_url":"https://api.github.com/users/OpenBazaar/following{/other_user}","gists_url":"https://api.github.com/users/OpenBazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenBazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenBazaar/subscriptions","organizations_url":"https://api.github.com/users/OpenBazaar/orgs","repos_url":"https://api.github.com/users/OpenBazaar/repos","events_url":"https://api.github.com/users/OpenBazaar/events{/privacy}","received_events_url":"https://api.github.com/users/OpenBazaar/received_events","type":"Organization","site_admin":false},"repo":{"id":55795245,"node_id":"MDEwOlJlcG9zaXRvcnk1NTc5NTI0NQ==","name":"openbazaar-go","full_name":"OpenBazaar/openbazaar-go","owner":{"login":"OpenBazaar","id":7438770,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzg3NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/7438770?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenBazaar","html_url":"https://github.com/OpenBazaar","followers_url":"https://api.github.com/users/OpenBazaar/followers","following_url":"https://api.github.com/users/OpenBazaar/following{/other_user}","gists_url":"https://api.github.com/users/OpenBazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenBazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenBazaar/subscriptions","organizations_url":"https://api.github.com/users/OpenBazaar/orgs","repos_url":"https://api.github.com/users/OpenBazaar/repos","events_url":"https://api.github.com/users/OpenBazaar/events{/privacy}","received_events_url":"https://api.github.com/users/OpenBazaar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenBazaar/openbazaar-go","description":"OpenBazaar 2.0 Server Daemon in Go","fork":false,"url":"https://api.github.com/repos/OpenBazaar/openbazaar-go","forks_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/forks","keys_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/teams","hooks_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/hooks","issue_events_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/events{/number}","events_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/events","assignees_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/assignees{/user}","branches_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/branches{/branch}","tags_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/tags","blobs_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/languages","stargazers_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/stargazers","contributors_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/contributors","subscribers_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/subscribers","subscription_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/subscription","commits_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/contents/{+path}","compare_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/merges","archive_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/downloads","issues_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues{/number}","pulls_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/labels{/name}","releases_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/releases{/id}","deployments_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/deployments","created_at":"2016-04-08T16:52:40Z","updated_at":"2018-07-25T17:06:03Z","pushed_at":"2018-07-25T19:54:25Z","git_url":"git://github.com/OpenBazaar/openbazaar-go.git","ssh_url":"git@github.com:OpenBazaar/openbazaar-go.git","clone_url":"https://github.com/OpenBazaar/openbazaar-go.git","svn_url":"https://github.com/OpenBazaar/openbazaar-go","homepage":"","size":32104,"stargazers_count":609,"watchers_count":609,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":162,"mirror_url":null,"archived":false,"open_issues_count":114,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":162,"open_issues":114,"watchers":609,"default_branch":"master"}},"base":{"label":"OpenBazaar:master","ref":"master","sha":"b455511cd9f14d9768467c02b7c10e9aa771ff33","user":{"login":"OpenBazaar","id":7438770,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzg3NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/7438770?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenBazaar","html_url":"https://github.com/OpenBazaar","followers_url":"https://api.github.com/users/OpenBazaar/followers","following_url":"https://api.github.com/users/OpenBazaar/following{/other_user}","gists_url":"https://api.github.com/users/OpenBazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenBazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenBazaar/subscriptions","organizations_url":"https://api.github.com/users/OpenBazaar/orgs","repos_url":"https://api.github.com/users/OpenBazaar/repos","events_url":"https://api.github.com/users/OpenBazaar/events{/privacy}","received_events_url":"https://api.github.com/users/OpenBazaar/received_events","type":"Organization","site_admin":false},"repo":{"id":55795245,"node_id":"MDEwOlJlcG9zaXRvcnk1NTc5NTI0NQ==","name":"openbazaar-go","full_name":"OpenBazaar/openbazaar-go","owner":{"login":"OpenBazaar","id":7438770,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzg3NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/7438770?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenBazaar","html_url":"https://github.com/OpenBazaar","followers_url":"https://api.github.com/users/OpenBazaar/followers","following_url":"https://api.github.com/users/OpenBazaar/following{/other_user}","gists_url":"https://api.github.com/users/OpenBazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenBazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenBazaar/subscriptions","organizations_url":"https://api.github.com/users/OpenBazaar/orgs","repos_url":"https://api.github.com/users/OpenBazaar/repos","events_url":"https://api.github.com/users/OpenBazaar/events{/privacy}","received_events_url":"https://api.github.com/users/OpenBazaar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenBazaar/openbazaar-go","description":"OpenBazaar 2.0 Server Daemon in Go","fork":false,"url":"https://api.github.com/repos/OpenBazaar/openbazaar-go","forks_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/forks","keys_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/teams","hooks_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/hooks","issue_events_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/events{/number}","events_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/events","assignees_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/assignees{/user}","branches_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/branches{/branch}","tags_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/tags","blobs_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/languages","stargazers_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/stargazers","contributors_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/contributors","subscribers_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/subscribers","subscription_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/subscription","commits_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/contents/{+path}","compare_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/merges","archive_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/downloads","issues_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues{/number}","pulls_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/labels{/name}","releases_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/releases{/id}","deployments_url":"https://api.github.com/repos/OpenBazaar/openbazaar-go/deployments","created_at":"2016-04-08T16:52:40Z","updated_at":"2018-07-25T17:06:03Z","pushed_at":"2018-07-25T19:54:25Z","git_url":"git://github.com/OpenBazaar/openbazaar-go.git","ssh_url":"git@github.com:OpenBazaar/openbazaar-go.git","clone_url":"https://github.com/OpenBazaar/openbazaar-go.git","svn_url":"https://github.com/OpenBazaar/openbazaar-go","homepage":"","size":32104,"stargazers_count":609,"watchers_count":609,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":162,"mirror_url":null,"archived":false,"open_issues_count":114,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":162,"open_issues":114,"watchers":609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/1009"},"html":{"href":"https://github.com/OpenBazaar/openbazaar-go/pull/1009"},"issue":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1009"},"comments":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/issues/1009/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/1009/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/pulls/1009/commits"},"statuses":{"href":"https://api.github.com/repos/OpenBazaar/openbazaar-go/statuses/001a618275334d8a5eceb62ca79b2ee6f1bb9af5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tyler-smith"}}