File Sharing MVP #384

Merged
sarah merged 52 commits from filesharing into master 2021-09-30 00:57:14 +00:00
1 changed files with 5 additions and 2 deletions
Showing only changes of commit 0f09a5ddcf - Show all commits

View File

@ -189,12 +189,15 @@ func (ta *TokenBoardClient) MakePayment() error {
if ok {
// Update tokens...we need a lock here to prevent SpendToken from modifying the tokens
// during this process..
log.Debugf("Transcript: %v", powtapp.Transcript().OutputTranscriptToAudit())
conn.Close()
log.Debugf("Updating Tokens")
ta.tokenLock.Lock()
ta.tokens = append(ta.tokens, powtapp.Tokens...)
if len(ta.tokens) < 5 {
go ta.MakePayment()
}
ta.tokenLock.Unlock()
log.Debugf("Transcript: %v", powtapp.Transcript().OutputTranscriptToAudit())
conn.Close()
return nil
}
}