mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-28 04:01:40 +00:00
add open/close to debora, barak bug fix
This commit is contained in:
@ -18,6 +18,7 @@ import (
|
||||
// When multiple are involved, the workflow is different.
|
||||
// (First the command(s) are signed by all validators,
|
||||
// and then it is broadcast).
|
||||
// TODO: Implement a reasonable workflow with multiple validators.
|
||||
|
||||
func StartProcess(privKey acm.PrivKey, remote string, command btypes.CommandStartProcess) (response btypes.ResponseStartProcess, err error) {
|
||||
nonce, err := GetNonce(remote)
|
||||
@ -49,6 +50,26 @@ func ListProcesses(privKey acm.PrivKey, remote string, command btypes.CommandLis
|
||||
return response, err
|
||||
}
|
||||
|
||||
func OpenListener(privKey acm.PrivKey, remote string, command btypes.CommandOpenListener) (response btypes.ResponseOpenListener, err error) {
|
||||
nonce, err := GetNonce(remote)
|
||||
if err != nil {
|
||||
return response, err
|
||||
}
|
||||
commandBytes, signature := SignCommand(privKey, nonce+1, command)
|
||||
_, err = RunAuthCommand(remote, commandBytes, []acm.Signature{signature}, &response)
|
||||
return response, err
|
||||
}
|
||||
|
||||
func CloseListener(privKey acm.PrivKey, remote string, command btypes.CommandCloseListener) (response btypes.ResponseCloseListener, err error) {
|
||||
nonce, err := GetNonce(remote)
|
||||
if err != nil {
|
||||
return response, err
|
||||
}
|
||||
commandBytes, signature := SignCommand(privKey, nonce+1, command)
|
||||
_, err = RunAuthCommand(remote, commandBytes, []acm.Signature{signature}, &response)
|
||||
return response, err
|
||||
}
|
||||
|
||||
func DownloadFile(privKey acm.PrivKey, remote string, command btypes.CommandServeFile, outPath string) (n int64, err error) {
|
||||
// Create authCommandJSONBytes
|
||||
nonce, err := GetNonce(remote)
|
||||
|
Reference in New Issue
Block a user