Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add distributed voucher system to libremesh #499

Merged
merged 11 commits into from Apr 18, 2019
Merged

Conversation

gmarcos87
Copy link
Contributor

@gmarcos87 gmarcos87 commented Apr 16, 2019

Me and Luandro have been working in Pirania and have built this plugin for shared-state that allows vouchers db to be shared between nodes.


local outputLines = ''

function macs2string(macs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you considered table.concat ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@gmarcos87 gmarcos87 requested a review from G10h4ck April 17, 2019 13:48
Copy link
Member

@nicopace nicopace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks ok

return result
end

function macs2string(macs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that this whole function could be substituted by table.concat, It's me or the function is still there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 3fd69c9

result[voucher.voucher] = voucher
end

io.popen("shared-state insert pirania", "w"):write(JSON.stringify(result))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line at the end of the file please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 9c23f93

@@ -0,0 +1,3 @@
#!/bin/sh
/etc/shared-state/publishers/shared-state-publish_vouchers
shared-state sync pirania
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line at the end of the file is missin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 9c23f93

@G10h4ck
Copy link
Member

G10h4ck commented Apr 18, 2019

@nicopace @aparcar do you read the code before appriving pull requests or you approve them on faith that my review is enough?

@nicopace
Copy link
Member

hehehe... i did the proper review... but good that u r around to catch the things you mentioned.

@aparcar
Copy link
Member

aparcar commented Apr 18, 2019

I check if the PR possibly breaks other stuff, if not and the package doesn't concern "core" functions of LiMe I'm approving it

@gmarcos87 gmarcos87 merged commit 92bad6d into master Apr 18, 2019
@spiccinini spiccinini deleted the shared-vouchers branch January 31, 2020 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants