Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Conversation

axic
Copy link
Member

@axic axic commented Mar 26, 2016

The ICAP document describes direct addresses as <155 bits.

I think the largest 30 character ICAP is the following: XE43ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ This decodes to 0x088f924eeceeda7fe92e1f5b0fffffffffffffff which is 156 bits.

This PR takes anything <= 0x088f924eeceeda7fe92e1f5b0fffffffffffffff as valid for ICAP Direct.

The spec also says that "generally these addresses begin with a zero byte" - would some implementations take that as "must begin with zero byte"? If yes, the above code will not generate valid addresses.

@axic axic force-pushed the feature/less-strict-icap branch from 36fac5f to 9befab6 Compare March 26, 2016 18:33
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 86.232% when pulling 9befab6 on feature/less-strict-icap into a317c50 on master.

@axic axic force-pushed the feature/less-strict-icap branch from 9befab6 to f5de70e Compare February 3, 2018 22:29
@axic axic merged commit 02599c6 into master Feb 3, 2018
@axic axic deleted the feature/less-strict-icap branch February 3, 2018 22:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants