Open shc261392 opened 4 years ago
@finoradin Just to confirm, this bug with ProposeDeal is at the starling-api level and not go-filecoin? (cc @ognots)
@finoradin Just to confirm, this bug with ProposeDeal is at the starling-api level and not go-filecoin? (cc @ognots)
I haven't tried to reproduce it, but based on how it has been reporting, yes that is my understanding.
@mishmosh @finoradin Thanks for the comments. According to current status, do you have any suggestion about using the store API?
This issue is expected to be fixed early next week, with the rewrite of the store command as part of the migration to lotus that @alexandrumatei36 is working on. I will update here once that's merged in.
Issue description
I encountered this error message when calling the
store
API:After adding some debug console to the starling-api, I've found that the
cid
andname
parameter passed to this function is alwaysundefined
if only 1 file is going to be stored.It turns out that in this line
The
FILE
object is actually an array if there's only one file (thefilesCount
here is1
)but the function
proposeDeal
should accept the file object instead of an array of the file objectsSteps to reproduce
The complete Python 3 code to invoke the API:
xmp.json:
where the
xmp/
folder contains only 1 file, anxmp.txt
fileEnvironment
starling-api commit hash: d6cb6b435e2ce5cf11d2d647e18d56db9329be9f filecoin version: v0.5.8