Conversation
validation_package | ||
)) | ||
} else { | ||
await!(run_call_back( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call is exactly the same as above, no? Could be pulled out of the if
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I will make changes to this
let entry = get_entry_from_dht(&context.clone(), address)?.ok_or( | ||
HolochainError::ErrorGeneric("Could not get Entry".to_string()), | ||
)?; | ||
let headers = state.get_headers(address.clone())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this right: you're getting the entry from the DHT but then assert that the header is already in the local state. This actually might be the case right now since we still have a full-sync DHT, but with this you would actually introduce the first bit in core that depends on a full-sync scenario, which I don't think we should do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed this will be moved into a separate branch as this code assumes a full synced DHT
Co-Authored-By: AshantiMutinta <AshantiMutinta@gmail.com>
Co-Authored-By: AshantiMutinta <AshantiMutinta@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, just one stray println.
@@ -34,6 +34,7 @@ pub fn fetch_entry_with_header( | |||
context: &Arc<Context>, | |||
) -> Result<EntryWithHeader, HolochainError> { | |||
let entry = fetch_entry_from_cas(address, &context)?; | |||
println!("entry found {:?}", entry.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be a call to context.log() or deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes I thought I got them all haha. Will make those changes thank you so so much
core/src/workflows/author_entry.rs
Outdated
/// test that a commit will publish and entry to the dht of a connected instance via the in-memory network | ||
fn test_commit_with_dht_publish() { | ||
let mut dna = test_dna(); | ||
dna.uuid = "test_commit_with_dht_publish".to_string(); | ||
let netname = Some("test_commit_with_dht_publish, the network"); | ||
let (_instance1, context1) = instance_by_name("jill", dna.clone(), netname); | ||
let (_instance2, context2) = instance_by_name("jack", dna, netname); | ||
|
||
//let test = JsonString::from(RawString::from("stuff:\")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stale comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stale comment :)
note : LinkValidation and EntryValidation had to be seperate because you do not want the user to check entry variants for Link data and you do not want the user to check Link Validations for Entries(even though links are technically entries). On top of that you cannot modify links