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 4 additions and 1 deletions
Showing only changes of commit b389a3421a - Show all commits

View File

@ -71,7 +71,7 @@ func (ta *TokenBoardClient) Init(connection tapir.Connection) {
log.Debugf("Successfully Initialized Connection")
go ta.Listen()
// Optimistically acquire many tokens for this server...
go ta.MakePayment()
ta.MakePayment()
ta.Replay()
} else {
connection.Close()
@ -200,6 +200,9 @@ func (ta *TokenBoardClient) MakePayment() error {
log.Debugf("Updating Tokens")
ta.tokenLock.Lock()
ta.tokens = append(ta.tokens, powtapp.Tokens...)
if len(ta.tokens) < 10 {
go ta.MakePayment()
}
ta.tokenLock.Unlock()
log.Debugf("Transcript: %v", powtapp.Transcript().OutputTranscriptToAudit())
conn.Close()