Skip to content

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Andersen committed Apr 11, 2018
1 parent 1fff929 commit 954bfba
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
4 changes: 0 additions & 4 deletions cli/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"strings"
"time"

"github.com/davecgh/go-spew/spew"
"github.com/howeyc/gopass"
"github.com/immesys/wave/eapi"
"github.com/immesys/wave/eapi/pb"
Expand Down Expand Up @@ -145,7 +144,6 @@ func actionRTGrant(c *cli.Context) error {
fmt.Printf("bad expiry\n")
os.Exit(1)
}
fmt.Printf("expires is %s\n", expires)
attesterder := loadEntitySecretDER(c.String("attester"))
subject, err := base64.URLEncoding.DecodeString(c.String("subject"))
if err != nil {
Expand Down Expand Up @@ -225,7 +223,6 @@ func actionRTGrant(c *cli.Context) error {
fmt.Printf("attester file is not an entity secret\n")
os.Exit(1)
}
fmt.Printf("inspect hash was: %s\n", base64.URLEncoding.EncodeToString(inspectresponse.Entity.Hash))
//Get the attester location
attesterresp, err := conn.ResolveHash(context.Background(), &pb.ResolveHashParams{
Hash: inspectresponse.Entity.Hash,
Expand Down Expand Up @@ -694,7 +691,6 @@ func actionRTProve(c *cli.Context) error {
if err == io.EOF {
break
}
spew.Dump(rv)
fmt.Printf("Synchronized %d/%d entities\n", rv.CompletedSyncs, rv.TotalSyncRequests)
}
fmt.Printf("Perspective graph sync complete\n")
Expand Down
8 changes: 6 additions & 2 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/urfave/cli"
)

const CLIVersion = "0.1.0"
const VersionFlag = "Prerelease 0.1.0"

func main() {
app := cli.NewApp()
Expand All @@ -18,7 +18,7 @@ func main() {
Value: "/etc/wave/wave.toml",
},
}
app.Version = CLIVersion
app.Version = VersionFlag
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "agent",
Expand Down Expand Up @@ -103,6 +103,10 @@ func main() {
Usage: "the granting entity secrets",
EnvVar: "WAVE_DEFAULT_ENTITY",
},
cli.StringFlag{
Name: "indirections, indir",
Usage: "set how many redelegations is permitted",
},
cli.StringFlag{
Name: "subject",
Usage: "the recipient entity hash",
Expand Down
24 changes: 16 additions & 8 deletions engine/states.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,29 @@ nextlocation:
//There is nothing more in this queue on this location yet
continue nextlocation
}
//The object is probably an attestation
attestation, err := e.st.GetAttestation(e.ctx, loc, object)
//Check if we already know about this attestation
found, err := e.ws.GetAttestationP(e.ctx, object)
if err != nil {
return 0, err
}
if attestation == nil {
//object was not an attestation, that is fine
} else {
//do not trigger a resync of dst, we are already syncing dst
err = e.insertPendingAttestationSync(attestation, false)
if found == nil {
//The object is probably an attestation
attestation, err := e.st.GetAttestation(e.ctx, loc, object)
if err != nil {
return 0, err
}
changes++
if attestation == nil {
//object was not an attestation, that is fine
} else {
//do not trigger a resync of dst, we are already syncing dst
err = e.insertPendingAttestationSync(attestation, false)
if err != nil {
return 0, err
}
changes++
}
}

err = e.ws.SetEntityQueueTokenP(sctx, loc, dest.Keccak256HI(), nextToken)
if err != nil {
panic(err)
Expand Down
3 changes: 3 additions & 0 deletions waved/waved.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ import (
"github.com/urfave/cli"
)

const VersionFlag = "Prerelease 0.1.0"

func Main(args []string) {
app := cli.NewApp()
app.Name = "waved"
app.Usage = "Run a WAVE daemon"
app.Action = action
app.Version = VersionFlag
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "config",
Expand Down

0 comments on commit 954bfba

Please sign in to comment.