This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 268
GetEntryOptions #932
Merged
Merged
GetEntryOptions #932
Changes from 27 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
547ba44
Remove redundant ValidationData::sources
maackle 0fb7201
Couple source with signature (MISI)
maackle aa28546
Add unimplemented headers field
maackle ea1c9a1
Make include ChainHeader with Hold
maackle ceeafed
Got all tests to compile
maackle dc53658
Merge remote-tracking branch 'origin/develop' into get-entry-options
maackle 5496150
app_spec test for multiple headers on entry
maackle 1f43c94
Return ChainHeaders -- but doesn't quite work
maackle c7374fe
Proper storage and retrieval of headers
maackle eaf0cad
Cleanup and test
maackle 0d34f57
Merge remote-tracking branch 'origin/develop' into get-entry-options
maackle 19c830f
Merge branch 'develop' into get-entry-options
maackle 5ca249b
Better test
maackle bccb0eb
Merge branch 'get-entry-options' of github.com:holochain/holochain-ru…
maackle 445f336
Fix wasm tests
maackle 9dea47e
Add failing test
maackle f068968
This doesn't work
maackle 53e4dd2
...but this does!
maackle 9463dd5
Merge branch 'develop' into get-entry-options
maackle b9d4e9b
Fix integration tests
maackle 5bf4ab7
Fix duplicate problem
maackle 86057db
Fix doc
maackle f490177
Merge branch 'develop' into get-entry-options
f18bee4
Merge branch 'develop' into get-entry-options
e395b2e
Update CHANGELOG.md
thedavidmeister 38fedaa
Update CHANGELOG.md
thedavidmeister 7fbfac2
Merge remote-tracking branch 'origin/develop' into get-entry-options
maackle cce241c
Update CHANGELOG.md
thedavidmeister f7d3d32
Allow for multiple local headers for entry
maackle cb1ac68
Merge branch 'get-entry-options' of github.com:holochain/holochain-ru…
maackle 12b685c
Remove type alias of doom
maackle fa07a51
Merge branch 'develop' into get-entry-options
maackle 43949f1
chain is not really a chain. rename -> chain_store
maackle 1a23190
Merge remote-tracking branch 'origin/develop' into get-entry-options
maackle 3c103fb
Fix old-style block_on calls
maackle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,28 +4,28 @@ use crate::{ | |
action::{Action, ActionWrapper}, | ||
context::Context, | ||
instance::dispatch_action, | ||
network::entry_with_header::EntryWithHeader, | ||
}; | ||
use futures::{ | ||
future::Future, | ||
task::{LocalWaker, Poll}, | ||
}; | ||
use holochain_core_types::{ | ||
cas::content::{Address, AddressableContent}, | ||
entry::Entry, | ||
error::HolochainError, | ||
}; | ||
use std::{pin::Pin, sync::Arc}; | ||
|
||
pub async fn hold_entry<'a>( | ||
entry: &'a Entry, | ||
context: &'a Arc<Context>, | ||
entry_wh: EntryWithHeader, | ||
context: Arc<Context>, | ||
) -> Result<Address, HolochainError> { | ||
let action_wrapper = ActionWrapper::new(Action::Hold(entry.clone())); | ||
let action_wrapper = ActionWrapper::new(Action::Hold(entry_wh.clone())); | ||
dispatch_action(context.action_channel(), action_wrapper.clone()); | ||
|
||
await!(HoldEntryFuture { | ||
context: context.clone(), | ||
address: entry.address(), | ||
context: context, | ||
address: entry_wh.entry.address(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't collapse names of variables like this, write the whole thing out :P There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about we deal with this after the |
||
}) | ||
} | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
get_first_header_for_entry_address
?there can be many headers for a single entry, even within a single chain
also i think we used to have this but i removed it because it boils down to applying a
find
to aniter
that already existsalso
self.chain().iter(&self.top_chain_header())
feels wrong somehow :/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.
Thanks for pointing this out, it was a real bug.
I introduced
iter_chain
toAgentState
for this purpose, which just iterates from the top header, what do you think?