Skip to content

Conversation

@zhengq1
Copy link
Contributor

@zhengq1 zhengq1 commented Jul 10, 2017

support store a value use Namespace and key as index.

Signed-off-by: zhengq1 ljqlyy@gmail.com


findflag := false
for k := 0; k < len(stateUpdater); k++ {
log.Trace(fmt.Sprintf("StateUpdate updaterPublickey %d: %x %x", k, stateUpdater[k].X, stateUpdater[k].Y))
Copy link
Contributor

Choose a reason for hiding this comment

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

use Tracef, Debugf, Warnf... method instead. see #332 for more details.

// stateKey
statePrefix := []byte{byte(ST_STATES)}
stateKey := append(statePrefix, namespace...)
stateKey = append(stateKey, key...)
Copy link
Contributor

Choose a reason for hiding this comment

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

this desgin may have problem since we can not figure out namespace and key from the stateKey.
case: namespace: dna, key: node3, and namespace:dnanode, key:3 will share the same underlying data。
recommendation: Use len(namespace) + namespace + key schema to construct the stateKey

@gasby88
Copy link
Contributor

gasby88 commented Jul 11, 2017

approve

Copy link
Collaborator

@dreamfly281 dreamfly281 left a comment

Choose a reason for hiding this comment

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

Suggest verify in user specify branch before official be merged into main branch

@zhengq1
Copy link
Contributor Author

zhengq1 commented Jul 28, 2017

this payload already verified in user case.

support store a value use Namespace and key as index.

Signed-off-by: zhengq1 <ljqlyy@gmail.com>

(cherry picked from commit 5223bd3)
Signed-off-by: zhengq1 <ljqlyy@gmail.com>
Honglei-Cong pushed a commit to Honglei-Cong/DNA that referenced this pull request Nov 27, 2019
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.

4 participants