Skip to content

Commit

Permalink
fix: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta committed May 9, 2023
1 parent ff3ad52 commit 0222f5e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
2 changes: 0 additions & 2 deletions tests/t0124_gateway_ipns_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ func TestGatewayIPNSRecord(t *testing.T) {
// ipfs dag import ../t0124-gateway-ipns-record/fixtures.car &&
// ipfs routing put /ipns/${IPNS_KEY} ../t0124-gateway-ipns-record/${IPNS_KEY}.ipns-record
// '
// TODO: what if you'd import with `t0124/simple-id.ipns-record`,
// then the loader "just" finds the file with `peer_id_simple-id.ipns-record`?
ipns := ipns.MustOpenIPNSRecordWithKey("t0124/k51qzi5uqu5dh71qgwangrt6r0nd4094i88nsady6qgd1dhjcyfsaqmpp143ab.ipns-record")
ipnsKey := ipns.Key()

Expand Down
20 changes: 1 addition & 19 deletions tooling/ipns/ipns.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,4 @@ func MustOpenIPNSRecordWithKey(file string) *IpnsRecord {
}

return ipnsRecord
}

// func MustOpenDNSLink(file string) *DNSLinks {
// fixturePath := path.Join(fixtures.Dir(), file)
// dnsLinks, err := OpenDNSLink(fixturePath)
// if err != nil {
// panic(err)
// }

// return dnsLinks
// }

// func (d *DNSLinks) Get(id string) string {
// dnsLink, ok := d.DNSLinks[id]
// if !ok {
// panic(fmt.Errorf("dnslink %s not found", id))
// }
// return dnsLink.Subdomain
// }
}
5 changes: 0 additions & 5 deletions tooling/ipns/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ func UnmarshalIpnsRecord(data []byte) (*IpnsRecord, error) {
}

func (i *IpnsRecord) WithKey(key string) *IpnsRecord {
// TODO: for some reason our keys are set to `"m"`, figure out why and reenable this check if possible.
// if i.entry.PublicKey != "" && i.entry.PublicKey != key {
// panic(fmt.Errorf("public key mismatch: %s != %s", i.entry.PublicKey, key))
// }

i.Entry.PublicKey = key
return i
}
Expand Down

0 comments on commit 0222f5e

Please sign in to comment.