{"action":"opened","issue":{"url":"https://api.github.com/repos/stellar/stellar-core/issues/720","labels_url":"https://api.github.com/repos/stellar/stellar-core/issues/720/labels{/name}","comments_url":"https://api.github.com/repos/stellar/stellar-core/issues/720/comments","events_url":"https://api.github.com/repos/stellar/stellar-core/issues/720/events","html_url":"https://github.com/stellar/stellar-core/issues/720","id":103784377,"number":720,"title":"bug: path payment crossing offers from sourceAccount may cause invalid state","user":{"login":"MonsieurNicolas","id":4213763,"avatar_url":"https://avatars.githubusercontent.com/u/4213763?v=3","gravatar_id":"","url":"https://api.github.com/users/MonsieurNicolas","html_url":"https://github.com/MonsieurNicolas","followers_url":"https://api.github.com/users/MonsieurNicolas/followers","following_url":"https://api.github.com/users/MonsieurNicolas/following{/other_user}","gists_url":"https://api.github.com/users/MonsieurNicolas/gists{/gist_id}","starred_url":"https://api.github.com/users/MonsieurNicolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MonsieurNicolas/subscriptions","organizations_url":"https://api.github.com/users/MonsieurNicolas/orgs","repos_url":"https://api.github.com/users/MonsieurNicolas/repos","events_url":"https://api.github.com/users/MonsieurNicolas/events{/privacy}","received_events_url":"https://api.github.com/users/MonsieurNicolas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stellar/stellar-core/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"MonsieurNicolas","id":4213763,"avatar_url":"https://avatars.githubusercontent.com/u/4213763?v=3","gravatar_id":"","url":"https://api.github.com/users/MonsieurNicolas","html_url":"https://github.com/MonsieurNicolas","followers_url":"https://api.github.com/users/MonsieurNicolas/followers","following_url":"https://api.github.com/users/MonsieurNicolas/following{/other_user}","gists_url":"https://api.github.com/users/MonsieurNicolas/gists{/gist_id}","starred_url":"https://api.github.com/users/MonsieurNicolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MonsieurNicolas/subscriptions","organizations_url":"https://api.github.com/users/MonsieurNicolas/orgs","repos_url":"https://api.github.com/users/MonsieurNicolas/repos","events_url":"https://api.github.com/users/MonsieurNicolas/events{/privacy}","received_events_url":"https://api.github.com/users/MonsieurNicolas/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/stellar/stellar-core/milestones/5","html_url":"https://github.com/stellar/stellar-core/milestones/Production","labels_url":"https://api.github.com/repos/stellar/stellar-core/milestones/5/labels","id":1071387,"number":5,"title":"Production","description":"stellar-core network is on production for integrators.","creator":{"login":"bekkibolthouse","id":5542732,"avatar_url":"https://avatars.githubusercontent.com/u/5542732?v=3","gravatar_id":"","url":"https://api.github.com/users/bekkibolthouse","html_url":"https://github.com/bekkibolthouse","followers_url":"https://api.github.com/users/bekkibolthouse/followers","following_url":"https://api.github.com/users/bekkibolthouse/following{/other_user}","gists_url":"https://api.github.com/users/bekkibolthouse/gists{/gist_id}","starred_url":"https://api.github.com/users/bekkibolthouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bekkibolthouse/subscriptions","organizations_url":"https://api.github.com/users/bekkibolthouse/orgs","repos_url":"https://api.github.com/users/bekkibolthouse/repos","events_url":"https://api.github.com/users/bekkibolthouse/events{/privacy}","received_events_url":"https://api.github.com/users/bekkibolthouse/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":72,"state":"open","created_at":"2015-04-16T21:46:59Z","updated_at":"2015-08-28T19:50:11Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-08-28T19:50:11Z","updated_at":"2015-08-28T19:50:11Z","closed_at":null,"body":"I noticed that \"sourceAccount\" is loaded at the beginning of the pathPayment operation but that the database may be updated by the offer exchange, causing sourceAccount to be stale.\r\n\r\nWe should either reload sourceAccount (or just not allow for multiple instances of ledgerEntries in memory by better leveraging shared_ptrs and the data layer) or not allow the offer exchange to invalidate sourceAccount (probably the simplest solution)."}}